mirror of https://github.com/mgba-emu/mgba.git
FFmpeg: Return false if a file fails to open
This commit is contained in:
parent
133424bd4f
commit
d9b645b209
1
CHANGES
1
CHANGES
|
@ -81,6 +81,7 @@ Misc:
|
||||||
- Qt: Remove audio thread
|
- Qt: Remove audio thread
|
||||||
- Qt: Remove audio buffer sizing in AudioProcessorQt
|
- Qt: Remove audio buffer sizing in AudioProcessorQt
|
||||||
- Qt: Re-enable QtMultimedia on Windows
|
- Qt: Re-enable QtMultimedia on Windows
|
||||||
|
- FFmpeg: Return false if a file fails to open
|
||||||
|
|
||||||
0.5.2: (2016-12-31)
|
0.5.2: (2016-12-31)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
|
@ -320,7 +320,9 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
|
||||||
avcodec_parameters_from_context(encoder->videoStream->codecpar, encoder->video);
|
avcodec_parameters_from_context(encoder->videoStream->codecpar, encoder->video);
|
||||||
#endif
|
#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;
|
return avformat_write_header(encoder->context, 0) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue