mirror of https://github.com/mgba-emu/mgba.git
FFmpeg: Disallow recording video with no audio nor video
This commit is contained in:
parent
b192e6b5ed
commit
8f1c3172c8
1
CHANGES
1
CHANGES
|
@ -19,6 +19,7 @@ Other fixes:
|
||||||
- Core: Ensure ELF regions can be written before trying
|
- Core: Ensure ELF regions can be written before trying
|
||||||
- Core: Fix integer overflow in ELF loading
|
- Core: Fix integer overflow in ELF loading
|
||||||
- FFmpeg: Fix crash when -strict -2 is needed for vcodec or container
|
- FFmpeg: Fix crash when -strict -2 is needed for vcodec or container
|
||||||
|
- FFmpeg: Disallow recording video with no audio nor video
|
||||||
- Qt: Only dynamically reset video scale if a game is running
|
- Qt: Only dynamically reset video scale if a game is running
|
||||||
- Qt: Fix race condition with proxied video events
|
- Qt: Fix race condition with proxied video events
|
||||||
- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
|
- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
|
||||||
|
|
|
@ -232,7 +232,7 @@ bool FFmpegEncoderVerifyContainer(struct FFmpegEncoder* encoder) {
|
||||||
AVOutputFormat* oformat = av_guess_format(encoder->containerFormat, 0, 0);
|
AVOutputFormat* oformat = av_guess_format(encoder->containerFormat, 0, 0);
|
||||||
AVCodec* acodec = avcodec_find_encoder_by_name(encoder->audioCodec);
|
AVCodec* acodec = avcodec_find_encoder_by_name(encoder->audioCodec);
|
||||||
AVCodec* vcodec = avcodec_find_encoder_by_name(encoder->videoCodec);
|
AVCodec* vcodec = avcodec_find_encoder_by_name(encoder->videoCodec);
|
||||||
if ((encoder->audioCodec && !acodec) || (encoder->videoCodec && !vcodec) || !oformat) {
|
if ((encoder->audioCodec && !acodec) || (encoder->videoCodec && !vcodec) || !oformat || (!acodec && !vcodec)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (encoder->audioCodec && !avformat_query_codec(oformat, acodec->id, FF_COMPLIANCE_EXPERIMENTAL)) {
|
if (encoder->audioCodec && !avformat_query_codec(oformat, acodec->id, FF_COMPLIANCE_EXPERIMENTAL)) {
|
||||||
|
|
Loading…
Reference in New Issue