/*
* Constants for DV codec
- * Copyright (c) 2002 Fabrice Bellard.
+ * Copyright (c) 2002 Fabrice Bellard
*
* This file is part of FFmpeg.
*
*/
/**
- * @file dvdata.h
+ * @file libavcodec/dvdata.h
* Constants for DV codec.
*/
.bpm = 8,
.block_sizes = block_sizes_dv100,
.audio_stride = 90,
- .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32kHz */
- .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */
- .audio_shuffle = dv_audio_shuffle525,
+ .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32kHz */
+ .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
+ .audio_shuffle = dv_audio_shuffle625,
}
};
*/
#define DV_MAX_BPM 8
-static inline const DVprofile* dv_frame_profile(const uint8_t* frame)
+static inline
+const DVprofile* dv_frame_profile(const DVprofile *sys,
+ const uint8_t* frame, unsigned buf_size)
{
int i;
if (dsf == dv_profiles[i].dsf && stype == dv_profiles[i].video_stype)
return &dv_profiles[i];
+ /* check if old sys matches and assumes corrupted input */
+ if (sys && buf_size == sys->frame_size)
+ return sys;
+
return NULL;
}