summaryrefslogtreecommitdiffstats
path: root/libavcodec/dvdata.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-18 02:57:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-18 02:57:25 +0100
commit2560d3b64810617f9cb43590101e504a102f150c (patch)
tree7afa966b320ab84efb721929228c8244ee33e4e7 /libavcodec/dvdata.c
parent50d67d951c161b1a6fa144d333daa1acc2c1fb1c (diff)
downloadffmpeg-streaming-2560d3b64810617f9cb43590101e504a102f150c.zip
ffmpeg-streaming-2560d3b64810617f9cb43590101e504a102f150c.tar.gz
dv: Fix streamcopy input.
Fixes Ticket1042 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdata.c')
-rw-r--r--libavcodec/dvdata.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c
index 8c06be7..9de1db5 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; i<FF_ARRAY_ELEMS(dv_profiles); i++)
- if (codec->coded_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;
OpenPOWER on IntegriCloud