summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-15 21:23:33 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-15 21:23:33 +0000
commit8353a009aae1a604251c0160193c39741c2fa27c (patch)
tree558d2b1951f2b4f05f0ab93b46d10afd0ebee929 /src/lib/ffmpeg.cc
parentd0bca7d33b8101cd87f78d5a76b2512dea3988f8 (diff)
parent4e5d5c7dcc6470b8dc918d03a00e30c07df60efe (diff)
Merge 1.0-seek and subtitle-content.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index d3653e311..4bf941523 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -191,6 +191,10 @@ FFmpeg::video_codec_context () const
AVCodecContext *
FFmpeg::audio_codec_context () const
{
+ if (!_ffmpeg_content->audio_stream ()) {
+ return 0;
+ }
+
return _ffmpeg_content->audio_stream()->stream(_format_context)->codec;
}