summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-11-30 21:22:01 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-11-30 21:22:01 +0000
commitd52b4abe8b7d58b1680b5ae5fccfcbd50ad98ef0 (patch)
tree1ed07c4099960d1748974a0bed144c8cbae22baf /libavcodec/mpeg12.c
parentfd1ef13bb4ac13f330178b4c2d67a62d3aaf46d9 (diff)
Move dummy picture allocation code from mpeg1/2 to mpegvideo.
This fixes a infinite loop on a b frame. Originally committed as revision 20672 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 8f4e2169e0..2e2bc367b1 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2434,25 +2434,6 @@ static int decode_chunks(AVCodecContext *avctx,
return -1;
}
- if(s2->last_picture_ptr==NULL && s2->pict_type!=FF_I_TYPE){
- int i;
- /* Allocate a dummy frame */
- i= ff_find_unused_picture(s2, 0);
- s2->last_picture_ptr= &s2->picture[i];
- if(ff_alloc_picture(s2, s2->last_picture_ptr, 0) < 0)
- return -1;
- s2->last_picture= *s2->last_picture_ptr;
- }
- if(s2->next_picture_ptr==NULL && s2->pict_type==FF_B_TYPE){
- int i;
- /* Allocate a dummy frame */
- i= ff_find_unused_picture(s2, 0);
- s2->next_picture_ptr= &s2->picture[i];
- if(ff_alloc_picture(s2, s2->next_picture_ptr, 0) < 0)
- return -1;
- s2->next_picture= *s2->next_picture_ptr;
- }
-
if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) {
s->slice_count++;
break;