From 2560d3b64810617f9cb43590101e504a102f150c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 18 Mar 2012 02:57:25 +0100 Subject: [PATCH] dv: Fix streamcopy input. Fixes Ticket1042 Signed-off-by: Michael Niedermayer --- libavcodec/dvdata.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c index 8c06be7c97..9de1db5270 100644 --- a/libavcodec/dvdata.c +++ b/libavcodec/dvdata.c @@ -323,11 +323,20 @@ const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys, const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec) { int i; + int w, h; + + if (codec->coded_width || codec->coded_height) { + w = codec->coded_width; + h = codec->coded_height; + } else { + w = codec->width; + h = codec->height; + } for (i=0; icoded_height == dv_profiles[i].height && + if (h == dv_profiles[i].height && codec->pix_fmt == dv_profiles[i].pix_fmt && - codec->coded_width == dv_profiles[i].width) + w == dv_profiles[i].width) return &dv_profiles[i]; return NULL;