diff options
author | N.N. <sergi_ll@users.sourceforge.net> | 2012-09-15 00:07:41 +0000 |
---|---|---|
committer | N.N. <sergi_ll@users.sourceforge.net> | 2012-09-15 00:07:41 +0000 |
commit | c59339cb5815f0da364ed7e782b0e466a5290c84 (patch) | |
tree | bb8ed7111ff8d550d0703f9418a4d5f5401126f7 /videogrid | |
parent | 32b43d1afb893f5477a6ad041e8c34fc4f9e0111 (diff) |
update some ffmpeg deprecated functions
svn path=/trunk/externals/pdvjtools/; revision=16233
Diffstat (limited to 'videogrid')
-rw-r--r-- | videogrid/videogrid.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/videogrid/videogrid.cc b/videogrid/videogrid.cc index bda1dcd..273ab79 100644 --- a/videogrid/videogrid.cc +++ b/videogrid/videogrid.cc @@ -155,7 +155,8 @@ extern "C" // Find the first video stream videoStream=-1; for(i=0; i<pFormatCtx->nb_streams; i++) - if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) + //if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) + if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { videoStream=i; break; @@ -204,8 +205,8 @@ extern "C" if(packet.stream_index==videoStream) { // Decode video frame - avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, packet.data, packet.size); - + //avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, packet.data, packet.size); + avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); // Did we get a video frame? if(frameFinished) { @@ -237,8 +238,9 @@ extern "C" if(packet.stream_index==videoStream) { // Decode video frame - avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, - packet.data, packet.size); + //avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, packet.data, packet.size); + avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); + // Did we get a video frame? if(frameFinished) |