Commit a32c3c23 authored by Steve Jiekak's avatar Steve Jiekak Committed by Michael Niedermayer

replaced av_dv_codec_profile by av_dv_codec_profile2 in encoder and dv muxers

Signed-off-by: 's avatarSteve Jiekak <devaureshy@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6e9ac02a
...@@ -47,7 +47,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) ...@@ -47,7 +47,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
PixblockDSPContext pdsp; PixblockDSPContext pdsp;
int ret; int ret;
s->sys = av_dv_codec_profile(avctx->width, avctx->height, avctx->pix_fmt); s->sys = av_dv_codec_profile2(avctx->width, avctx->height, avctx->pix_fmt, avctx->time_base);
if (!s->sys) { if (!s->sys) {
av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video. " av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video. "
"Valid DV profiles are:\n", "Valid DV profiles are:\n",
......
...@@ -422,8 +422,8 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c, ...@@ -422,8 +422,8 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c,
int64_t timestamp, int flags) int64_t timestamp, int flags)
{ {
// FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk) // FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk)
const AVDVProfile *sys = av_dv_codec_profile(c->vst->codec->width, c->vst->codec->height, const AVDVProfile *sys = av_dv_codec_profile2(c->vst->codec->width, c->vst->codec->height,
c->vst->codec->pix_fmt); c->vst->codec->pix_fmt, c->vst->codec->time_base);
int64_t offset; int64_t offset;
int64_t size = avio_size(s->pb) - s->data_offset; int64_t size = avio_size(s->pb) - s->data_offset;
int64_t max_offset = ((size - 1) / sys->frame_size) * sys->frame_size; int64_t max_offset = ((size - 1) / sys->frame_size) * sys->frame_size;
......
...@@ -337,7 +337,8 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s) ...@@ -337,7 +337,8 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
goto bail_out; goto bail_out;
} }
} }
c->sys = av_dv_codec_profile(vst->codec->width, vst->codec->height, vst->codec->pix_fmt); c->sys = av_dv_codec_profile2(vst->codec->width, vst->codec->height,
vst->codec->pix_fmt, vst->codec->time_base);
if (!c->sys) if (!c->sys)
goto bail_out; goto bail_out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment