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

Side by Side Diff: source/patched-ffmpeg-mt/libavformat/rtpenc.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
OLDNEW
1 /* 1 /*
2 * RTP output format 2 * RTP output format
3 * Copyright (c) 2002 Fabrice Bellard 3 * Copyright (c) 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 case CODEC_ID_MPEG1VIDEO: 124 case CODEC_ID_MPEG1VIDEO:
125 case CODEC_ID_MPEG2VIDEO: 125 case CODEC_ID_MPEG2VIDEO:
126 break; 126 break;
127 case CODEC_ID_MPEG2TS: 127 case CODEC_ID_MPEG2TS:
128 n = s->max_payload_size / TS_PACKET_SIZE; 128 n = s->max_payload_size / TS_PACKET_SIZE;
129 if (n < 1) 129 if (n < 1)
130 n = 1; 130 n = 1;
131 s->max_payload_size = n * TS_PACKET_SIZE; 131 s->max_payload_size = n * TS_PACKET_SIZE;
132 s->buf_ptr = s->buf; 132 s->buf_ptr = s->buf;
133 break; 133 break;
134 case CODEC_ID_H264:
135 /* check for H.264 MP4 syntax */
136 if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
137 s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
138 }
139 break;
134 case CODEC_ID_AMR_NB: 140 case CODEC_ID_AMR_NB:
135 case CODEC_ID_AMR_WB: 141 case CODEC_ID_AMR_WB:
136 if (!s->max_frames_per_packet) 142 if (!s->max_frames_per_packet)
137 s->max_frames_per_packet = 12; 143 s->max_frames_per_packet = 12;
138 if (st->codec->codec_id == CODEC_ID_AMR_NB) 144 if (st->codec->codec_id == CODEC_ID_AMR_NB)
139 n = 31; 145 n = 31;
140 else 146 else
141 n = 61; 147 n = 61;
142 /* max_header_toc_size + the largest AMR payload must fit */ 148 /* max_header_toc_size + the largest AMR payload must fit */
143 if (1 + s->max_frames_per_packet + n > s->max_payload_size) { 149 if (1 + s->max_frames_per_packet + n > s->max_payload_size) {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 NULL_IF_CONFIG_SMALL("RTP output format"), 417 NULL_IF_CONFIG_SMALL("RTP output format"),
412 NULL, 418 NULL,
413 NULL, 419 NULL,
414 sizeof(RTPMuxContext), 420 sizeof(RTPMuxContext),
415 CODEC_ID_PCM_MULAW, 421 CODEC_ID_PCM_MULAW,
416 CODEC_ID_NONE, 422 CODEC_ID_NONE,
417 rtp_write_header, 423 rtp_write_header,
418 rtp_write_packet, 424 rtp_write_packet,
419 rtp_write_trailer, 425 rtp_write_trailer,
420 }; 426 };
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/rtpenc.h ('k') | source/patched-ffmpeg-mt/libavformat/rtsp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698