summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-28 08:47:43 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-01 01:31:57 +0200
commitc93d0271dad86dccdbe518dbbe6e2175adce6804 (patch)
tree860e64c9491499fd21e59a8f866f115305196b35 /src/lib/ffmpeg.cc
parent8963f0007af1a312017b9627c18b82ec2a577591 (diff)
Remove some FFmpeg-related warnings by using AVStream::codecpar.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index eb131d434..7bb17f9bf 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -143,10 +143,9 @@ FFmpeg::setup_general ()
optional<int> video_stream_undefined_frame_rate;
-DCPOMATIC_DISABLE_WARNINGS
for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
auto s = _format_context->streams[i];
- if (s->codec->codec_type == AVMEDIA_TYPE_VIDEO && avcodec_find_decoder(s->codec->codec_id)) {
+ if (s->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && avcodec_find_decoder(s->codecpar->codec_id)) {
if (s->avg_frame_rate.num > 0 && s->avg_frame_rate.den > 0) {
/* This is definitely our video stream */
_video_stream = i;
@@ -156,7 +155,6 @@ DCPOMATIC_DISABLE_WARNINGS
}
}
}
-DCPOMATIC_ENABLE_WARNINGS
/* Files from iTunes sometimes have two video streams, one with the avg_frame_rate.num and .den set
to zero. Only use such a stream if there is no alternative.