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

Unified Diff: patches/to_upstream/12_vp3_key_frame_after_flush.patch

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/to_upstream/11_mkv_buffer_overflow.patch ('k') | patches/to_upstream/15_mkv_buffer_overflow.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: patches/to_upstream/12_vp3_key_frame_after_flush.patch
===================================================================
--- patches/to_upstream/12_vp3_key_frame_after_flush.patch (revision 50820)
+++ patches/to_upstream/12_vp3_key_frame_after_flush.patch (working copy)
@@ -1,65 +0,0 @@
-diff -rpu -N orig/libavcodec/vp3.c ffmpeg-mt/libavcodec/vp3.c
---- orig/libavcodec/vp3.c 2010-06-17 09:40:08.794413800 -0700
-+++ ffmpeg-mt/libavcodec/vp3.c 2010-06-17 09:40:12.475781900 -0700
-@@ -134,6 +134,7 @@ typedef struct Vp3DecodeContext {
- AVFrame last_frame;
- AVFrame current_frame;
- int keyframe;
-+ int flushed;
- DSPContext dsp;
- int flipped_image;
- int last_slice_end;
-@@ -1608,6 +1609,7 @@ static av_cold int vp3_decode_init(AVCod
- s->avctx = avctx;
- s->width = FFALIGN(avctx->width, 16);
- s->height = FFALIGN(avctx->height, 16);
-+ s->flushed = 0;
- if (avctx->pix_fmt == PIX_FMT_NONE)
- avctx->pix_fmt = PIX_FMT_YUV420P;
- avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
-@@ -1891,7 +1893,7 @@ static int vp3_decode_frame(AVCodecConte
- if (s->qps[i] != s->last_qps[i] || s->qps[0] != s->last_qps[0])
- init_dequantizer(s, i);
-
-- if (avctx->skip_frame >= AVDISCARD_NONKEY && !s->keyframe)
-+ if (!s->keyframe && (avctx->skip_frame >= AVDISCARD_NONKEY || s->flushed))
- return buf_size;
-
- s->current_frame.reference = 3;
-@@ -1902,6 +1904,7 @@ static int vp3_decode_frame(AVCodecConte
- }
-
- if (s->keyframe) {
-+ s->flushed = 0;
- if (!s->theora)
- {
- skip_bits(&gb, 4); /* width code */
-@@ -2040,6 +2043,12 @@ static av_cold int vp3_decode_end(AVCode
- return 0;
- }
-
-+static void vp3_decode_flush (AVCodecContext *avctx) {
-+ // FIXME: Actually flush data.
-+ Vp3DecodeContext *s = avctx->priv_data;
-+ s->flushed = 1;
-+}
-+
- static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
- {
- Vp3DecodeContext *s = avctx->priv_data;
-@@ -2346,6 +2355,7 @@ AVCodec theora_decoder = {
- vp3_decode_frame,
- CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
- NULL,
-+ .flush = vp3_decode_flush,
- .long_name = NULL_IF_CONFIG_SMALL("Theora"),
- .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
- };
-@@ -2362,6 +2372,7 @@ AVCodec vp3_decoder = {
- vp3_decode_frame,
- CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
- NULL,
-+ .flush = vp3_decode_flush,
- .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
- .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
- };
« no previous file with comments | « patches/to_upstream/11_mkv_buffer_overflow.patch ('k') | patches/to_upstream/15_mkv_buffer_overflow.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698