Remove some deprecated FFmpeg stuff.
authorCarl Hetherington <cth@carlh.net>
Thu, 9 Jan 2014 23:50:21 +0000 (23:50 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 9 Jan 2014 23:50:21 +0000 (23:50 +0000)
src/lib/ffmpeg.cc
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_examiner.cc

index e5e5f317a0efeea02dda41588685e1e2d58d3fe7..d3653e311fdfadeabe97d9a3898d5fe0c835fb36 100644 (file)
@@ -62,7 +62,7 @@ FFmpeg::~FFmpeg ()
                }
        }
 
-       avcodec_free_frame (&_frame);
+       av_frame_free (&_frame);
        
        avformat_close_input (&_format_context);
 }
@@ -136,7 +136,7 @@ FFmpeg::setup_general ()
                }
        }
 
-       _frame = avcodec_alloc_frame ();
+       _frame = av_frame_alloc ();
        if (_frame == 0) {
                throw DecodeError (N_("could not allocate frame"));
        }
index d9b7796599b8c7cdf7687454fd6dc668db5195ef..b672b2c1fd6e571dbc5140b30c43729888bb38cd 100644 (file)
@@ -167,8 +167,6 @@ FFmpegDecoder::pass ()
                return;
        }
 
-       avcodec_get_frame_defaults (_frame);
-
        shared_ptr<const Film> film = _film.lock ();
        assert (film);
 
@@ -345,8 +343,6 @@ FFmpegDecoder::seek (VideoContent::Frame frame, bool accurate)
                        continue;
                }
                
-               avcodec_get_frame_defaults (_frame);
-               
                int finished = 0;
                r = avcodec_decode_video2 (video_codec_context(), _frame, &finished, &_packet);
                if (r >= 0 && finished) {
index 78b6e3121c363faf1b0c95a4701970273b970636..a63090d12e72a5bbfc90185a7df2b758012af839 100644 (file)
@@ -70,7 +70,6 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c)
                }
 
                int frame_finished;
-               avcodec_get_frame_defaults (_frame);
 
                AVCodecContext* context = _format_context->streams[_packet.stream_index]->codec;