> Le 9 déc. 2014 à 08:12, YIRAN LI <[email protected]> a écrit :
>
> Hi,
>
> I have a question about read frame,
>
> Suppose I've just opened a file, so the readpointer is at the beginning of
> the file.
>
> Compare these two methods:
>
> 1. call av_read_frame + avcode_decode_video2 to decode 100 video packets(
> suppose each packet can decode into a frame)
> 2. call av_read_frame, but only decode the 100th packet (all previous 99
> packets are just discarded)
>
> Will the 100th frame from method 1 and the frame from method 2 have same
> content, timestamp, etc?
>
> Thanks
Hi,
Decoding the 100th packet alone can be equivalent in both situations only if
this packet is a keyframe. If not, FFmpeg will need all the packets up to the
first preceding key frame in order to be able to give you a frame with correct
content. I'm unsure whether other metadata like timestamp depend on the method
(although I don't think so).
Lucas
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user