aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-24 14:20:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-24 14:20:00 +0000
commit6ad7cd0469989529e4bb0d469ab5f1978dd1c201 (patch)
tree823541d1c173810316ce7d3ec38120320636b761 /libavcodec/mpegvideo.c
parent560588b7171097cef08645562017b40c325356a4 (diff)
downloadffmpeg-6ad7cd0469989529e4bb0d469ab5f1978dd1c201.tar.gz
set last_picture for h.264 too, this significantly improves error concealment quality, i hope it doesnt break anything as last_picture_ptr was always NULL for h.264
Originally committed as revision 7686 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 9c6b9f1205..1c2710849c 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1538,6 +1538,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
/* mark&release old frames */
if (s->pict_type != B_TYPE && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->data[0]) {
+ if(s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3){
avctx->release_buffer(avctx, (AVFrame*)s->last_picture_ptr);
/* release forgotten pictures */
@@ -1550,6 +1551,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
}
+ }
}
alloc:
if(!s->encoding){
@@ -1587,7 +1589,6 @@ alloc:
copy_picture(&s->current_picture, s->current_picture_ptr);
- if(s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3){
if (s->pict_type != B_TYPE) {
s->last_picture_ptr= s->next_picture_ptr;
if(!s->dropable)
@@ -1621,7 +1622,6 @@ alloc:
s->next_picture.linesize[i] *=2;
}
}
- }
s->hurry_up= s->avctx->hurry_up;
s->error_resilience= avctx->error_resilience;