summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-29 11:28:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-29 11:28:28 +0200
commit0d5e615c10583af5f346f0bc7420ebc5077a5d47 (patch)
tree673512e8fc02bf2233315b6a26352db6323f6f94 /libavcodec
parent215430e049b78fc4c3d1cb8f6086bcd4bae0375e (diff)
parent27b0e6ebfd47b0c11156c18b90fa8c571f0f60c3 (diff)
Merge commit '27b0e6ebfd47b0c11156c18b90fa8c571f0f60c3'
* commit '27b0e6ebfd47b0c11156c18b90fa8c571f0f60c3': h264: drop needs_realloc Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c3
-rw-r--r--libavcodec/h264.h1
-rw-r--r--libavcodec/h264_picture.c1
-rw-r--r--libavcodec/h264_slice.c7
4 files changed, 0 insertions, 12 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 0f756a2b74..00984297c5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -380,9 +380,6 @@ void ff_h264_free_tables(H264Context *h, int free_rbsp)
ff_h264_unref_picture(h, &h->DPB[i]);
memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
av_freep(&h->DPB);
- } else if (h->DPB) {
- for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
- h->DPB[i].needs_realloc = 1;
}
h->cur_pic_ptr = NULL;
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index bafc40f96a..c595dde99f 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -322,7 +322,6 @@ typedef struct H264Picture {
int mbaff; ///< 1 -> MBAFF frame 0-> not MBAFF
int field_picture; ///< whether or not picture was encoded in separate fields
- int needs_realloc; ///< picture needs to be reallocated (eg due to a frame size change)
int reference;
int recovered; ///< picture at IDR or recovery point + recovery count
int invalid_gap;
diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
index 1880a58e50..d9d2a25839 100644
--- a/libavcodec/h264_picture.c
+++ b/libavcodec/h264_picture.c
@@ -114,7 +114,6 @@ int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src)
dst->long_ref = src->long_ref;
dst->mbaff = src->mbaff;
dst->field_picture = src->field_picture;
- dst->needs_realloc = src->needs_realloc;
dst->reference = src->reference;
dst->crop = src->crop;
dst->crop_left = src->crop_left;
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 320845e684..3313cc34ec 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -293,8 +293,6 @@ static inline int pic_is_unused(H264Context *h, H264Picture *pic)
{
if (!pic->f.buf[0])
return 1;
- if (pic->needs_realloc && !(pic->reference & DELAYED_PIC_REF))
- return 1;
return 0;
}
@@ -309,11 +307,6 @@ static int find_unused_picture(H264Context *h)
if (i == H264_MAX_PICTURE_COUNT)
return AVERROR_INVALIDDATA;
- if (h->DPB[i].needs_realloc) {
- h->DPB[i].needs_realloc = 0;
- ff_h264_unref_picture(h, &h->DPB[i]);
- }
-
return i;
}