all repos — mgba @ d9b645b2098cc4ccb5662d0705d3f3a3d37b7486

mGBA Game Boy Advance Emulator

FFmpeg: Return false if a file fails to open
Vicki Pfau vi@endrift.com
Tue, 04 Apr 2017 02:01:06 -0700
commit

d9b645b2098cc4ccb5662d0705d3f3a3d37b7486

parent

133424bd4f6b262dccb7da55b3f38a69c9da826b

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -81,6 +81,7 @@ - GBA: Ignore invalid opcodes used by the Wii U VC emulator

- Qt: Remove audio thread - Qt: Remove audio buffer sizing in AudioProcessorQt - Qt: Re-enable QtMultimedia on Windows + - FFmpeg: Return false if a file fails to open 0.5.2: (2016-12-31) Bugfixes:
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -320,7 +320,9 @@ #ifdef FFMPEG_USE_CODECPAR

avcodec_parameters_from_context(encoder->videoStream->codecpar, encoder->video); #endif - avio_open(&encoder->context->pb, outfile, AVIO_FLAG_WRITE); + if (avio_open(&encoder->context->pb, outfile, AVIO_FLAG_WRITE) < 0) { + return false; + } return avformat_write_header(encoder->context, 0) >= 0; }