diff mbox

[FFmpeg-devel,03/11] avformat/apngdec: Don't free extradata manually

Message ID 20191210215955.11178-3-andreas.rheinhardt@gmail.com
State Accepted
Commit c1d300f83a006219b2ffd95648d2438cf8b2a094
Headers show

Commit Message

Andreas Rheinhardt Dec. 10, 2019, 9:59 p.m. UTC
The extradata will be freed automatically when the corresponding stream
gets freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/apngdec.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Michael Niedermayer Dec. 12, 2019, 5:52 p.m. UTC | #1
On Tue, Dec 10, 2019 at 10:59:47PM +0100, Andreas Rheinhardt wrote:
> The extradata will be freed automatically when the corresponding stream
> gets freed.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/apngdec.c | 4 ----
>  1 file changed, 4 deletions(-)

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index b5696e069c..0f1d04a365 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -241,10 +241,6 @@  static int apng_read_header(AVFormatContext *s)
     }
 
 fail:
-    if (st->codecpar->extradata_size) {
-        av_freep(&st->codecpar->extradata);
-        st->codecpar->extradata_size = 0;
-    }
     return ret;
 }