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) {
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) {
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)
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