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

Michael Niedermayer michaelni at gmx.at
Mon May 16 22:23:07 CEST 2011


On Wed, May 04, 2011 at 06:46:11PM -0700, Baptiste Coudurier wrote:
> ---
>  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);

This returns the same frame (in the where its stored sense) twice
without (re)get_buffer() and without setting FF_BUFFER_HINTS_REUSABLE


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110516/b6ea2597/attachment.asc>


More information about the ffmpeg-devel mailing list