<div dir="ltr">You can have a look at this tutorial, which explains how to make sure that you get a whole image<br><a href="http://blog.tomaka17.com/2012/03/libavcodeclibavformat-tutorial/">http://blog.tomaka17.com/2012/03/libavcodeclibavformat-tutorial/</a><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-03 20:01 GMT+02:00 Andrey Utkin <span dir="ltr"><<a href="mailto:andrey.krieger.utkin@gmail.com" target="_blank">andrey.krieger.utkin@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2014-04-03 12:33 GMT+03:00 cyril poulet <<a href="mailto:xenosender@gmail.com">xenosender@gmail.com</a>>:<br>
<div class="">> I'm no expert, but it would not surprise me much if the flag indicated only<br>
> the beginning of the key frame, and not that it contains an entire key<br>
> frame...<br>
> Also, I'm not sure that you can really rely on it, the AVFrame->pict_type is<br>
> much more reliable<br>
<br>
</div>You are right, looks AV_PKT_FLAG_KEY marks a "beginning of key frame".<br>
Some log excerpt is below for justification. You can see a large first<br>
AVPacket marked as key, and one small following AVPacket. The decoder<br>
returns actual picture (if I type) after decoding both of them.<br>
Thanks to all for sharing ideas, especially to Cyril.<br>
<br>
<30>Apr 3 20:50:23 : D(3/axis): read AVPacket: stream_index: 0, size:<br>
15080, flags: 1, dts: -9223372036854775808, pts: -9223372036854775808<br>
<30>Apr 3 20:50:23 : D(3/axis): read AVPacket: stream_index: 0, size:<br>
66, flags: 0, dts: -9223372036854775808, pts: 3560<br>
<30>Apr 3 20:50:23 : D(3/axis): read AVPacket: stream_index: 0, size:<br>
10232, flags: 0, dts: 3560, pts: 7198<br>
...<br>
<30>Apr 3 20:50:23 : D(3/axis): mo proc block decodes packet, size<br>
15080, flags 1<br>
<30>Apr 3 20:50:23 : D(3/axis): [libav] debug no picture<br>
<30>Apr 3 20:50:23 : D(3/axis): no picture from decoding frame in mo proc<br>
<30>Apr 3 20:50:23 : D(3/axis): mo proc block decodes packet, size 66, flags 0<br>
<30>Apr 3 20:50:23 : D(3/axis): Decoded picture type: I (1)<br>
<30>Apr 3 20:50:23 : D(3/axis): mo proc block decodes packet, size<br>
10232, flags 0<br>
<30>Apr 3 20:50:23 : D(3/axis): Decoded picture type: P (2)<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Andrey Utkin<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br></div>