}
}
- avcodec_free_frame (&_frame);
+ av_frame_free (&_frame);
avformat_close_input (&_format_context);
}
}
}
- _frame = avcodec_alloc_frame ();
+ _frame = av_frame_alloc ();
if (_frame == 0) {
throw DecodeError (N_("could not allocate frame"));
}
AVCodecContext *
FFmpeg::audio_codec_context () const
{
+ if (!_ffmpeg_content->audio_stream ()) {
+ return 0;
+ }
+
return _ffmpeg_content->audio_stream()->stream(_format_context)->codec;
}