Commit 517dd04f authored by James Almer's avatar James Almer

Merge commit 'bc7f4268'

* commit 'bc7f4268':
  h264: drop tests whether the codec id is AV_CODEC_ID_H264

Conflicts:
libavcodec/h264dec.c
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents fd4eb565 bc7f4268
...@@ -2349,7 +2349,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) ...@@ -2349,7 +2349,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
sl->deblocking_filter = 0; sl->deblocking_filter = 0;
sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME || sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
avctx->codec_id != AV_CODEC_ID_H264 ||
(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY)); (CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->slice_ctx[0].er.error_status_table) { if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->slice_ctx[0].er.error_status_table) {
......
...@@ -406,15 +406,13 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) ...@@ -406,15 +406,13 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx)
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
} }
if (avctx->codec_id == AV_CODEC_ID_H264) { if (avctx->ticks_per_frame == 1) {
if (avctx->ticks_per_frame == 1) { if(h->avctx->time_base.den < INT_MAX/2) {
if(h->avctx->time_base.den < INT_MAX/2) { h->avctx->time_base.den *= 2;
h->avctx->time_base.den *= 2; } else
} else h->avctx->time_base.num /= 2;
h->avctx->time_base.num /= 2;
}
avctx->ticks_per_frame = 2;
} }
avctx->ticks_per_frame = 2;
if (avctx->extradata_size > 0 && avctx->extradata) { if (avctx->extradata_size > 0 && avctx->extradata) {
ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size, ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
......
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