I have some code that takes a running stream of uncompressed video data and 
encodes it using AV_CODEC_ID_H264.

The sequence I follow is

1.  Call avcodec_encode_video2 on the AVFrame which contains my uncompressed 
frame.

2.  Call avcodec_encode_video2 again passing NULL in the AVFrame parameter.

3.  Repeat 2. Until a frame arrives from the encoder.

This seems to work fine if the codec is MPEG2, but with H264, it hangs inside 
avcodec_encode_video2 at step 2) on the second frame. I don't have debug 
symbols and can't figure out why. Does there need to be a minimum set of 
uncompressed data in the encoder before trying to flush out an encoded frame 
for H264? If so, how do I know when it is safe to flush a frame?



_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to