[Libav-user] Decoding Problem (got_picture always return 0)
hydezhao at gmail.com
Mon Mar 26 10:11:32 CEST 2012
Thank you very much sir!
I solved my problems according to your suggestion!
While I have to point out that:
1. for the four bytes header, it is automatically added if we set
= 1*, and 0 while add the size of frame, so we don't need to add it
manually. (Don't forget to set *param.b_repeat_headers = 1* )
2. after calling x264_encoder_encode, we don't need to call
x264_nal_encode, because it is already done inside of the function
Thank you all again!
2012/3/24 Việt Hùng Nguyễn <hungtrodt5 at gmail.com>
> It seems you got some mistakes in your code.
> 1- In your conversion colour space code, not all stride is frameWidth. For
> YUV420p, stride for Cr, Cb is frameWidth/2
> 2- After you call x264_encoder_encode, you should call x264_nal_encode
> 3- When send data to ffmpeg h264 decoder, remember that is annex-B data
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user