--- src/frame.cc.ffmpeg 2011-06-24 09:30:14.000000000 +0200 +++ src/frame.cc 2011-06-24 10:11:21.000000000 +0200 @@ -1062,8 +1062,12 @@ AVFrame *frame = avcodec_alloc_frame(); AVPicture dest; int got_picture; + AVPacket avpkt; - avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); + av_init_packet(&avpkt); + avpkt.data=data; + avpkt.size=GetFrameSize(); + avcodec_decode_video2( libavcodec, frame, &got_picture, &avpkt); if ( got_picture ) { avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() ); @@ -1122,8 +1126,12 @@ AVFrame *frame = avcodec_alloc_frame();; AVPicture output; int got_picture; + AVPacket avpkt; - avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); + av_init_packet(&avpkt); + avpkt.data=data; + avpkt.size=GetFrameSize(); + avcodec_decode_video2( libavcodec, frame, &got_picture, &avpkt); if ( got_picture ) { avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() ); @@ -1155,8 +1163,12 @@ #if defined(HAVE_LIBAVCODEC) AVFrame *frame = avcodec_alloc_frame(); int got_picture; + AVPacket avpkt; - avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); + av_init_packet(&avpkt); + avpkt.data=data; + avpkt.size=GetFrameSize(); + avcodec_decode_video2( libavcodec, frame, &got_picture, &avpkt); int width = GetWidth(), height = GetHeight(); @@ -1319,12 +1331,12 @@ #if defined(HAVE_LIBAVCODEC) if ( avformatEncoder == NULL ) { - avformatEncoder = av_alloc_format_context(); + avformatEncoder = avformat_alloc_context(); if ( avformatEncoder ) { - avformatEncoder->oformat = guess_format( "dv", NULL, NULL ); + avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL ); AVStream* vst = av_new_stream( avformatEncoder, 0 ); - vst->codec->codec_type = CODEC_TYPE_VIDEO; + vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_DVVIDEO; vst->codec->bit_rate = 25000000; vst->start_time = 0;