[Ffmpeg-devel] Handling decode delay

Mean fixounet
Sun Dec 31 11:37:32 CET 2006


Michael Niedermayer wrote:
>
>>       My feeling would be to add an uint32_t field to avframe which is 
>> copied into current picture when calling the decoder.
>>       It is the simplest way i've thought of, but i probably missed 
>> something.
>>
>>       Any hint/suggestion ?
>>     
>
> AVFrame.opaque
>
>   

    First, thank you for your answer.

    But for at least h264 i did not find the place where frame->opaque 
is copied to current_picture so that
       it can be retrieved later. For h264 i'm under the impression that 
frame is overwritten by reordered picture
       completely.

    I had to do the following, see diff attached (it is not a patch :) ) 
to get the opaque field of the decoded image
       matching the one in the coded image.

    I most probably missed something, unless the opaque field is not 
meant to be used that way (?).

    Thanks again.

Ps : Seems to be the same thing for mpeg4.

===================================================================
--- h264.c      (revision 2495)
+++ h264.c      (working copy)
@@ -8182,7 +8182,9 @@
         av_log(h->s.avctx, AV_LOG_DEBUG, "error, NO frame\n");
         return -1;
     }
-
+    /* MEANX */
+      s->current_picture_ptr->opaque=pict->opaque;
+    /* MEANX */
     {
         Picture *out = s->current_picture_ptr;
 #if 0 //decode order







More information about the ffmpeg-devel mailing list