Browse Source

dv: fix avpriv_dv_codec_profile with lowres > 0

Fixes ticket #44.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Marton Balint Michael Niedermayer 13 years ago
parent
commit
7b2dba1c50
2 changed files with 5 additions and 7 deletions
  1. +3
    -3
      libavcodec/dvdata.c
  2. +2
    -4
      libavformat/dv.c

+ 3
- 3
libavcodec/dvdata.c View File

@@ -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;


+ 2
- 4
libavformat/dv.c View File

@@ -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 */


Loading…
Cancel
Save