mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-29 00:34:33 +01:00
Add FFmpeg fake header/header_size check to simplify some calls
This commit is contained in:
parent
0e64480cd0
commit
7a08ea263f
@ -364,6 +364,10 @@ ffmpeg_codec_data * init_ffmpeg_config(STREAMFILE *streamFile, uint8_t * header,
|
||||
memcpy(&data->config, config, sizeof(ffmpeg_custom_config));
|
||||
}
|
||||
|
||||
/* ignore bad combos */
|
||||
if ((header && !header_size) || (!header && header_size))
|
||||
goto fail;
|
||||
|
||||
/* fake header to trick FFmpeg into demuxing/decoding the stream */
|
||||
if (header_size > 0) {
|
||||
data->header_size = header_size;
|
||||
|
Loading…
Reference in New Issue
Block a user