Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: source/patched-ffmpeg-mt/libavformat/utils.c

Issue 2850032: ffmpeg update to june 23 version which fixes mp4 crash on still frames with 3... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/udp.c ('k') | source/patched-ffmpeg-mt/libavutil/eval.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * various utility functions for use within FFmpeg 2 * various utility functions for use within FFmpeg
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard 3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 AVInputFormat *av_find_input_format(const char *short_name) 276 AVInputFormat *av_find_input_format(const char *short_name)
277 { 277 {
278 AVInputFormat *fmt; 278 AVInputFormat *fmt;
279 for(fmt = first_iformat; fmt != NULL; fmt = fmt->next) { 279 for(fmt = first_iformat; fmt != NULL; fmt = fmt->next) {
280 if (match_format(short_name, fmt->name)) 280 if (match_format(short_name, fmt->name))
281 return fmt; 281 return fmt;
282 } 282 }
283 return NULL; 283 return NULL;
284 } 284 }
285 285
286 /* memory handling */ 286 #if LIBAVFORMAT_VERSION_MAJOR < 53 && CONFIG_SHARED && HAVE_SYMVER
287 FF_SYMVER(void, av_destruct_packet_nofree, (AVPacket *pkt), "LIBAVFORMAT_52")
288 {
289 av_destruct_packet_nofree(pkt);
290 }
287 291
292 FF_SYMVER(void, av_destruct_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
293 {
294 av_destruct_packet(pkt);
295 }
296
297 FF_SYMVER(int, av_new_packet, (AVPacket *pkt, int size), "LIBAVFORMAT_52")
298 {
299 return av_new_packet(pkt, size);
300 }
301
302 FF_SYMVER(int, av_dup_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
303 {
304 return av_dup_packet(pkt);
305 }
306
307 FF_SYMVER(void, av_free_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
308 {
309 av_free_packet(pkt);
310 }
311
312 FF_SYMVER(void, av_init_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
313 {
314 av_log(NULL, AV_LOG_WARNING, "Diverting av_*_packet function calls to libavc odec. Recompile to improve performance\n");
315 av_init_packet(pkt);
316 }
317 #endif
288 318
289 int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size) 319 int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size)
290 { 320 {
291 int ret= av_new_packet(pkt, size); 321 int ret= av_new_packet(pkt, size);
292 322
293 if(ret<0) 323 if(ret<0)
294 return ret; 324 return ret;
295 325
296 pkt->pos= url_ftell(s); 326 pkt->pos= url_ftell(s);
297 327
(...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3569 const char *authorization, const char *hostname, 3599 const char *authorization, const char *hostname,
3570 int port, const char *fmt, ...) 3600 int port, const char *fmt, ...)
3571 { 3601 {
3572 #if CONFIG_NETWORK 3602 #if CONFIG_NETWORK
3573 struct addrinfo hints, *ai; 3603 struct addrinfo hints, *ai;
3574 #endif 3604 #endif
3575 3605
3576 str[0] = '\0'; 3606 str[0] = '\0';
3577 if (proto) 3607 if (proto)
3578 av_strlcatf(str, size, "%s://", proto); 3608 av_strlcatf(str, size, "%s://", proto);
3579 if (authorization) 3609 if (authorization && authorization[0])
3580 av_strlcatf(str, size, "%s@", authorization); 3610 av_strlcatf(str, size, "%s@", authorization);
3581 #if CONFIG_NETWORK && defined(AF_INET6) 3611 #if CONFIG_NETWORK && defined(AF_INET6)
3582 /* Determine if hostname is a numerical IPv6 address, 3612 /* Determine if hostname is a numerical IPv6 address,
3583 * properly escape it within [] in that case. */ 3613 * properly escape it within [] in that case. */
3584 memset(&hints, 0, sizeof(hints)); 3614 memset(&hints, 0, sizeof(hints));
3585 hints.ai_flags = AI_NUMERICHOST; 3615 hints.ai_flags = AI_NUMERICHOST;
3586 if (!getaddrinfo(hostname, NULL, &hints, &ai)) { 3616 if (!getaddrinfo(hostname, NULL, &hints, &ai)) {
3587 if (ai->ai_family == AF_INET6) { 3617 if (ai->ai_family == AF_INET6) {
3588 av_strlcat(str, "[", size); 3618 av_strlcat(str, "[", size);
3589 av_strlcat(str, hostname, size); 3619 av_strlcat(str, hostname, size);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 local_pkt.pts = av_rescale_q(pkt->pts, 3651 local_pkt.pts = av_rescale_q(pkt->pts,
3622 src->streams[pkt->stream_index]->time_base, 3652 src->streams[pkt->stream_index]->time_base,
3623 dst->streams[dst_stream]->time_base); 3653 dst->streams[dst_stream]->time_base);
3624 if (pkt->dts != AV_NOPTS_VALUE) 3654 if (pkt->dts != AV_NOPTS_VALUE)
3625 local_pkt.dts = av_rescale_q(pkt->dts, 3655 local_pkt.dts = av_rescale_q(pkt->dts,
3626 src->streams[pkt->stream_index]->time_base, 3656 src->streams[pkt->stream_index]->time_base,
3627 dst->streams[dst_stream]->time_base); 3657 dst->streams[dst_stream]->time_base);
3628 return av_write_frame(dst, &local_pkt); 3658 return av_write_frame(dst, &local_pkt);
3629 } 3659 }
3630 3660
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/udp.c ('k') | source/patched-ffmpeg-mt/libavutil/eval.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698