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