projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
src
/
lib
/
ffmpeg.cc
diff --git
a/src/lib/ffmpeg.cc
b/src/lib/ffmpeg.cc
index e5e5f317a0efeea02dda41588685e1e2d58d3fe7..4bf9415234e3d54b844e8881e56a75dd30558492 100644
(file)
--- a/
src/lib/ffmpeg.cc
+++ b/
src/lib/ffmpeg.cc
@@
-62,7
+62,7
@@
FFmpeg::~FFmpeg ()
}
}
}
}
- av
codec_free_fram
e (&_frame);
+ av
_frame_fre
e (&_frame);
avformat_close_input (&_format_context);
}
avformat_close_input (&_format_context);
}
@@
-136,7
+136,7
@@
FFmpeg::setup_general ()
}
}
}
}
- _frame = av
codec_alloc_frame
();
+ _frame = av
_frame_alloc
();
if (_frame == 0) {
throw DecodeError (N_("could not allocate frame"));
}
if (_frame == 0) {
throw DecodeError (N_("could not allocate frame"));
}
@@
-191,6
+191,10
@@
FFmpeg::video_codec_context () const
AVCodecContext *
FFmpeg::audio_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;
}
return _ffmpeg_content->audio_stream()->stream(_format_context)->codec;
}