diff options
Diffstat (limited to 'libavcodec/dvdata.h')
-rw-r--r-- | libavcodec/dvdata.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/dvdata.h b/libavcodec/dvdata.h index 21023cfe59..a32b863c5d 100644 --- a/libavcodec/dvdata.h +++ b/libavcodec/dvdata.h @@ -698,7 +698,9 @@ enum dv_pack_type { */ #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; @@ -715,6 +717,10 @@ static inline const DVprofile* dv_frame_profile(const uint8_t* frame) 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; } |