aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-04 00:16:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-04 00:16:58 +0100
commit532b93b51631ee58443bee8aec7c2a2b2a1746be (patch)
treebade8e58b6a5b5a06ddab001146945a7cf6669f6 /libavcodec
parent5047849584f278d62b2e18281e89da13dddcbf87 (diff)
parentfeded990e3ef9af4a0b827d5b6d8fe86f0b94942 (diff)
downloadffmpeg-532b93b51631ee58443bee8aec7c2a2b2a1746be.tar.gz
Merge commit 'feded990e3ef9af4a0b827d5b6d8fe86f0b94942'
* commit 'feded990e3ef9af4a0b827d5b6d8fe86f0b94942': mpegvideo: set reference/pict_type on generated reference frames Conflicts: libavcodec/mpegvideo.c The picture type is left at P type as it was explicitly set before Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index ccfbe65147..2373bc4f35 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1580,7 +1580,11 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return i;
}
s->last_picture_ptr = &s->picture[i];
+
+ s->last_picture_ptr->reference = 3;
s->last_picture_ptr->f.key_frame = 0;
+ s->last_picture_ptr->f.pict_type = AV_PICTURE_TYPE_P;
+
if (ff_alloc_picture(s, s->last_picture_ptr, 0) < 0) {
s->last_picture_ptr = NULL;
return -1;
@@ -1613,7 +1617,11 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return i;
}
s->next_picture_ptr = &s->picture[i];
+
+ s->next_picture_ptr->reference = 3;
s->next_picture_ptr->f.key_frame = 0;
+ s->next_picture_ptr->f.pict_type = AV_PICTURE_TYPE_P;
+
if (ff_alloc_picture(s, s->next_picture_ptr, 0) < 0) {
s->next_picture_ptr = NULL;
return -1;