[FFmpeg-cvslog] dv: fix avpriv_dv_codec_profile with lowres > 0
Marton Balint
git at videolan.org
Mon Dec 26 22:14:29 CET 2011
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Dec 25 19:31:23 2011 +0100| [7b2dba1c50c92c76f147727be7c27872252e29f6] | committer: Michael Niedermayer
dv: fix avpriv_dv_codec_profile with lowres > 0
Fixes ticket #44.
Signed-off-by: Marton Balint <cus at passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b2dba1c50c92c76f147727be7c27872252e29f6
---
libavcodec/dvdata.c | 6 +++---
libavformat/dv.c | 6 ++----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c
index b29f5ce..f292d4b 100644
--- a/libavcodec/dvdata.c
+++ b/libavcodec/dvdata.c
@@ -287,9 +287,9 @@ const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec)
int i;
for (i=0; i<FF_ARRAY_ELEMS(dv_profiles); i++)
- if (codec->height == dv_profiles[i].height &&
- codec->pix_fmt == dv_profiles[i].pix_fmt &&
- codec->width == dv_profiles[i].width)
+ if (codec->coded_height == dv_profiles[i].height &&
+ codec->pix_fmt == dv_profiles[i].pix_fmt &&
+ codec->coded_width == dv_profiles[i].width)
return &dv_profiles[i];
return NULL;
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 69c0de9..d99dee3 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -251,10 +251,8 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num,
c->sys->time_base.den);
avctx->time_base= c->sys->time_base;
- if (!avctx->width){
- avctx->width = c->sys->width;
- avctx->height = c->sys->height;
- }
+ if (!avctx->width)
+ avcodec_set_dimensions(avctx, c->sys->width, c->sys->height);
avctx->pix_fmt = c->sys->pix_fmt;
/* finding out SAR is a little bit messy */
More information about the ffmpeg-cvslog
mailing list