diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-14 00:11:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-14 00:16:49 +0200 |
commit | 01d3ebaf219d83c0a70cdf9696ecb6b868e8a165 (patch) | |
tree | ca9f4c673c608ef15c24c206debeedf77051a2b9 /libavcodec | |
parent | a3bc7a9ebf37e642878f6a50a234feb987e732e9 (diff) | |
download | ffmpeg-01d3ebaf219d83c0a70cdf9696ecb6b868e8a165.tar.gz |
AVFrame: only set parameters from AVCodecContext in decode_video*() when no frame reordering is used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6ec8addfb1..b61f9b70ea 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -743,6 +743,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi ret = avctx->codec->decode(avctx, picture, got_picture_ptr, avpkt); picture->pkt_dts= avpkt->dts; + + if(!avctx->has_b_frames){ picture->pkt_pos= avpkt->pos; if (!picture->sample_aspect_ratio.num) picture->sample_aspect_ratio = avctx->sample_aspect_ratio; @@ -752,6 +754,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi picture->height = avctx->height; if (picture->format == PIX_FMT_NONE) picture->format = avctx->pix_fmt; + } } emms_c(); //needed to avoid an emms_c() call before every return; |