diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 4 | ||||
| -rw-r--r-- | src/lib/ffmpeg_examiner.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 88b76d04e..697bfe3ae 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -260,11 +260,11 @@ FFmpegExaminer::stream_name (AVStream* s) const return n; } -int +optional<int> FFmpegExaminer::bits_per_pixel () const { if (video_codec_context()->pix_fmt == -1) { - throw DecodeError (_("Could not find pixel format for video.")); + return optional<int>(); } AVPixFmtDescriptor const * d = av_pix_fmt_desc_get (video_codec_context()->pix_fmt); diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h index a511a2fc1..5cd70d979 100644 --- a/src/lib/ffmpeg_examiner.h +++ b/src/lib/ffmpeg_examiner.h @@ -69,7 +69,7 @@ public: return video_codec_context()->colorspace; } - int bits_per_pixel () const; + boost::optional<int> bits_per_pixel () const; private: void video_packet (AVCodecContext *); |
