<div dir="ltr"><div>are you sure that the packet contains the entire frame ?<br></div>You might just miss some data, try decoding the next packets until you get a picture decoded...<br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">2014-04-03 3:28 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">
Hi all!<br>
I am checking a C application using ffmpeg libs, which does the following:<br>
it demuxes h264 stream from RTSP channel, and, when an event happens,<br>
it waits for next keyframe (determined with AVPacket.flags &<br>
AV_PKT_FLAG_KEY), creates appropriate decoder AVCodecContext for it,<br>
and decodes the frame for further processing. The idea is that having<br>
a keyframe, we can decode just single encoded frame and get valid<br>
picture. This approach must have been working correctly in practice,<br>
but now i have it not working with h264 stream from IP camera Axis<br>
M1034-W; the decoding operation indicates that we got no picture (by a<br>
avcodec_decode_video2() flag parameter), and prints<br>
[h264 @ blah] no picture<br>
<br>
This shouldn't be RTP loss, the camera is connected directly to my PC<br>
with a patchcord.<br>
If that is needed, i can share a remuxed stream dump.<br>
BTW Is there an easy way to print out the types of encoded h264 frames<br>
(I, P, B...)?<br>
<br>
Could please somebody elaborate what exactly happens? Is above<br>
approach generally broken, or it can be fixed (without decoding a lot<br>
more frames)?<br>
<span class="HOEnZb"><font color="#888888"><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>
</font></span></blockquote></div><br></div>