hi all,
 
I write a H264
decode program referring to the following link:
http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html
Because I use the FFmpeg 0.8.6, I change this sample from avcodec_decode_video 
to avcodec_decode_video2, just like the following codes:
 
AVPacket g_avpkt;


bool GetNextFrame(AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, int 
videoStream, AVFrame *pFrame)


{

.........
if(av_read_frame(pFormatCtx, &g_avpkt)<0)    
bytesDecoded=avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &g_avpkt);


.........
Firstly av_read_frame
read some data from an h264 file(D1), but avcodec_decode_video2 always
return with -1. I have tried these code with h264 file(safe), it is ok. How to 
use avcodec_decode_video2 to decode h264 files correctly? Thanks a lot.  
                                          
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to