[FFmpeg-cvslog] dv: Fix streamcopy input.

Michael Niedermayer git at videolan.org
Sun Mar 18 03:24:13 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 18 02:57:25 2012 +0100| [2560d3b64810617f9cb43590101e504a102f150c] | committer: Michael Niedermayer

dv: Fix streamcopy input.

Fixes Ticket1042

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2560d3b64810617f9cb43590101e504a102f150c
---

 libavcodec/dvdata.c |   13 +++++++++++--
 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;



More information about the ffmpeg-cvslog mailing list