summaryrefslogtreecommitdiff
path: root/src/lib/image.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-29 00:27:49 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-01 01:31:57 +0200
commite29ce33a36c2e20444d57196defc86d5072bce81 (patch)
treef3a0e5bc200af5a94170b96779d4407ce0db7e39 /src/lib/image.cc
parent81646d1dd5b28fa05d8f134142dcbaed6314ebab (diff)
Switch decoding to ffmpeg send/receive API.
Diffstat (limited to 'src/lib/image.cc')
-rw-r--r--src/lib/image.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index efe5b3390..52e8878ad 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -977,9 +977,11 @@ Image::Image (Image const & other)
Image::Image (AVFrame* frame)
: _size (frame->width, frame->height)
- , _pixel_format (static_cast<AVPixelFormat> (frame->format))
+ , _pixel_format (static_cast<AVPixelFormat>(frame->format))
, _aligned (true)
{
+ DCPOMATIC_ASSERT (_pixel_format != AV_PIX_FMT_NONE);
+
allocate ();
for (int i = 0; i < planes(); ++i) {