Remove unused variable.
authorCarl Hetherington <cth@carlh.net>
Tue, 9 Oct 2012 15:02:07 +0000 (16:02 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 9 Oct 2012 15:02:07 +0000 (16:02 +0100)
src/lib/ffmpeg_decoder.cc
src/lib/options.h

index 1096bb253a98daac87110b41e68264269c648a7e..3991323ce6897fb84b8995cdaf44558345171e7b 100644 (file)
@@ -172,10 +172,8 @@ FFmpegDecoder::do_pass ()
 
                int frame_finished;
 
-               if (_opt->decode_video) {
-                       while (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
-                               process_video (_frame);
-                       }
+               while (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
+                       process_video (_frame);
                }
 
                if (_audio_stream >= 0 && _opt->decode_audio) {
@@ -192,7 +190,7 @@ FFmpegDecoder::do_pass ()
                return true;
        }
 
-       if (_packet.stream_index == _video_stream && _opt->decode_video) {
+       if (_packet.stream_index == _video_stream) {
 
                int frame_finished;
                if (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
index 1156ece1dfb3fb5a2dfe7e597303ed49a3ea9eac..45a1768c2df0bb3a7f54777b0c21deab23dfb029 100644 (file)
@@ -39,7 +39,6 @@ public:
        Options (std::string f, std::string e, std::string m)
                : padding (0)
                , apply_crop (true)
-               , decode_video (true)
                , decode_video_frequency (0)
                , decode_audio (true)
                , _frame_out_path (f)
@@ -93,7 +92,6 @@ public:
        int padding;                ///< number of pixels of padding (in terms of the output size) each side of the image
        bool apply_crop;            ///< true to apply cropping
        int black_after;            ///< first frame for which to output a black frame, rather than the actual video content, or 0 for none
-       bool decode_video;          ///< true to decode video, otherwise false
        int decode_video_frequency; ///< skip frames so that this many are decoded in all (or 0) (for generating thumbnails)
        bool decode_audio;          ///< true to decode audio, otherwise false