[FFmpeg-cvslog] avformat/latmenc: abort if no extradata is available

James Almer git at videolan.org
Thu Apr 14 01:08:07 EEST 2022


ffmpeg | branch: release/3.4 | James Almer <jamrial at gmail.com> | Tue Oct 15 11:38:23 2019 -0300| [b8197738d27f21583d9f83d7fa8c978d3a47af85] | committer: Michael Niedermayer

avformat/latmenc: abort if no extradata is available

Fixes ticket #8273.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit dd01947397b98e94c3f2a79d5820aaf4594f4d3b)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8197738d27f21583d9f83d7fa8c978d3a47af85
---

 libavformat/latmenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index c919976d49..3e1a01c989 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -172,7 +172,8 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
                 if (ret < 0)
                     return ret;
                 memcpy(par->extradata, side_data, side_data_size);
-            }
+            } else
+                return AVERROR_INVALIDDATA;
         }
     }
 



More information about the ffmpeg-cvslog mailing list