summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/chd.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-08-01 02:23:26 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-08-01 02:23:26 +0000
commit776b251aa23217f866ea1f592abe5ed2c7550df1 (patch)
treee952bd3ebc1a310a5fa86300c607c8b481337a4c /src/lib/util/chd.c
parentc43a103858359c60a71aad43fd901ed47c5f1162 (diff)
Removed per-frame metadata support from chdman. Creating an A/V
now simply requires an AVI file input. Relaxed VBI Manchester code clocking to allow for a little bit of wiggle when finding the clock. Changed laserdisc support to parse white flags and other data from the VBI data directly, rather than relying on the textual metadata. Expanded video frame cache to 3. Changed the way frames are assembled to decrease the likelihood of getting an interlaced weave. Fixed sound creation so that it is done at reset time instead of device start, when the sound devices aren't yet live. Fixed bug in winwork that caused the creation of single work items to return NULL, and thus lead to massive memory leaks when using A/V CHDs.
Diffstat (limited to 'src/lib/util/chd.c')
-rw-r--r--src/lib/util/chd.c6
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;