[FFmpeg-devel] [PATCH] In svq3 decoder, output first black picture to emulate quicktime and pts == dts.

Baptiste Coudurier baptiste.coudurier at gmail.com
Thu May 5 03:46:11 CEST 2011


---
 libavcodec/svq3.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index bdd5d2a..f206634 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1091,16 +1091,13 @@ static int svq3_decode_frame(AVCodecContext *avctx,
 
     MPV_frame_end(s);
 
-    if (s->pict_type == FF_B_TYPE || s->low_delay) {
+    if (s->pict_type == FF_B_TYPE || s->low_delay || avctx->frame_number == 0) {
         *(AVFrame *) data = *(AVFrame *) &s->current_picture;
     } else {
         *(AVFrame *) data = *(AVFrame *) &s->last_picture;
     }
 
-    /* Do not output the last pic after seeking. */
-    if (s->last_picture_ptr || s->low_delay) {
-        *data_size = sizeof(AVFrame);
-    }
+    *data_size = sizeof(AVFrame);
 
     return buf_size;
 }
-- 
1.7.4.4



More information about the ffmpeg-devel mailing list