diff options
Diffstat (limited to 'src/lib/util/chd.c')
-rw-r--r-- | src/lib/util/chd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util/chd.c b/src/lib/util/chd.c index d9083fc73e1..e8fda05e2ad 100644 --- a/src/lib/util/chd.c +++ b/src/lib/util/chd.c @@ -2827,7 +2827,7 @@ static chd_error av_codec_config(chd_file *chd, int param, void *config) static chd_error av_codec_postinit(chd_file *chd) { - int fps, fpsfrac, width, height, interlaced, channels, rate, metabytes; + int fps, fpsfrac, width, height, interlaced, channels, rate; UINT32 fps_times_1million, max_samples_per_frame, bytes_per_frame; av_codec_data *data = chd->codecdata; char metadata[256]; @@ -2843,13 +2843,13 @@ static chd_error av_codec_postinit(chd_file *chd) return err; /* extract the info */ - if (sscanf(metadata, AV_METADATA_FORMAT, &fps, &fpsfrac, &width, &height, &interlaced, &channels, &rate, &metabytes) != 8) + if (sscanf(metadata, AV_METADATA_FORMAT, &fps, &fpsfrac, &width, &height, &interlaced, &channels, &rate) != 7) return CHDERR_INVALID_METADATA; /* compute the bytes per frame */ fps_times_1million = fps * 1000000 + fpsfrac; max_samples_per_frame = ((UINT64)rate * 1000000 + fps_times_1million - 1) / fps_times_1million; - bytes_per_frame = 12 + metabytes + channels * max_samples_per_frame * 2 + width * height * 2; + bytes_per_frame = 12 + channels * max_samples_per_frame * 2 + width * height * 2; if (bytes_per_frame > chd->header.hunkbytes) return CHDERR_INVALID_METADATA; |