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

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/libvorbis.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 * copyright (c) 2002 Mark Hills <mark@pogo.org.uk> 2 * copyright (c) 2002 Mark Hills <mark@pogo.org.uk>
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 if(context->buffer_index){ 185 if(context->buffer_index){
186 ogg_packet *op2= (ogg_packet*)context->buffer; 186 ogg_packet *op2= (ogg_packet*)context->buffer;
187 op2->packet = context->buffer + sizeof(ogg_packet); 187 op2->packet = context->buffer + sizeof(ogg_packet);
188 188
189 l= op2->bytes; 189 l= op2->bytes;
190 avccontext->coded_frame->pts= av_rescale_q(op2->granulepos, (AVRational) {1, avccontext->sample_rate}, avccontext->time_base); 190 avccontext->coded_frame->pts= av_rescale_q(op2->granulepos, (AVRational) {1, avccontext->sample_rate}, avccontext->time_base);
191 //FIXME we should reorder the user supplied pts and not assume that they are spaced by 1/sample_rate 191 //FIXME we should reorder the user supplied pts and not assume that they are spaced by 1/sample_rate
192 192
193 memcpy(packets, op2->packet, l); 193 memcpy(packets, op2->packet, l);
194 context->buffer_index -= l + sizeof(ogg_packet); 194 context->buffer_index -= l + sizeof(ogg_packet);
195 memcpy(context->buffer, context->buffer + l + sizeof(ogg_packet), contex t->buffer_index); 195 memmove(context->buffer, context->buffer + l + sizeof(ogg_packet), conte xt->buffer_index);
196 // av_log(avccontext, AV_LOG_DEBUG, "E%d\n", l); 196 // av_log(avccontext, AV_LOG_DEBUG, "E%d\n", l);
197 } 197 }
198 198
199 return l; 199 return l;
200 } 200 }
201 201
202 202
203 static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) { 203 static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) {
204 OggVorbisContext *context = avccontext->priv_data ; 204 OggVorbisContext *context = avccontext->priv_data ;
205 /* ogg_packet op ; */ 205 /* ogg_packet op ; */
(...skipping 16 matching lines...) Expand all
222 AVMEDIA_TYPE_AUDIO, 222 AVMEDIA_TYPE_AUDIO,
223 CODEC_ID_VORBIS, 223 CODEC_ID_VORBIS,
224 sizeof(OggVorbisContext), 224 sizeof(OggVorbisContext),
225 oggvorbis_encode_init, 225 oggvorbis_encode_init,
226 oggvorbis_encode_frame, 226 oggvorbis_encode_frame,
227 oggvorbis_encode_close, 227 oggvorbis_encode_close,
228 .capabilities= CODEC_CAP_DELAY, 228 .capabilities= CODEC_CAP_DELAY,
229 .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, 229 .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
230 .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"), 230 .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
231 } ; 231 } ;
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/libfaad.c ('k') | source/patched-ffmpeg-mt/libavcodec/mpeg4audio.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698