summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-06 04:09:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-06 04:09:47 +0100
commit0d9f2f5c47a008d3077510e499d68a4e960e2c66 (patch)
tree259a63de479dfccd0e5f777e043d73aebec16aab
parent28eacd135162e34379b5c0146ad41a3601f35cd8 (diff)
parent66499f34b56fc6a9fdef25543bd9d576fc787895 (diff)
Merge commit '66499f34b56fc6a9fdef25543bd9d576fc787895'
* commit '66499f34b56fc6a9fdef25543bd9d576fc787895': mpegvideo: do not set current_picture_ptr in decoders Conflicts: libavcodec/mss2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h261dec.c9
-rw-r--r--libavcodec/mss2.c7
-rw-r--r--libavcodec/vc1dec.c9
3 files changed, 0 insertions, 25 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 241099eeff..49f1b4a199 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -586,15 +586,6 @@ retry:
if (ff_MPV_common_init(s) < 0)
return -1;
- /* We need to set current_picture_ptr before reading the header,
- * otherwise we cannot store anything in there. */
- if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) {
- int i = ff_find_unused_picture(s, 0);
- if (i < 0)
- return i;
- s->current_picture_ptr = &s->picture[i];
- }
-
ret = h261_decode_picture_header(h);
/* skip if the header was thrashed */
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index dd96394c31..99db046f03 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -377,13 +377,6 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
ff_mpeg_flush(avctx);
- if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) {
- int i = ff_find_unused_picture(s, 0);
- if (i < 0)
- return i;
- s->current_picture_ptr = &s->picture[i];
- }
-
if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0)
return ret;
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e44fe2dea3..87846449ec 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5968,15 +5968,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
}
}
- /* We need to set current_picture_ptr before reading the header,
- * otherwise we cannot store anything in there. */
- if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) {
- int i = ff_find_unused_picture(s, 0);
- if (i < 0)
- goto err;
- s->current_picture_ptr = &s->picture[i];
- }
-
// do parse frame header
v->pic_header_flag = 0;
v->first_pic_header_flag = 1;