avformat/latmenc: abort if no extradata is available
authorJames Almer <jamrial@gmail.com>
Tue, 15 Oct 2019 14:38:23 +0000 (11:38 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 15 Oct 2019 16:04:44 +0000 (13:04 -0300)
Fixes ticket #8273.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/latmenc.c

index db867eb..5ae677f 100644 (file)
@@ -176,7 +176,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;
         }
     }