avformat/mux: Check return code of av_packet_split_side_data()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 30 Mar 2017 13:58:32 +0000 (15:58 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 30 Mar 2017 14:30:14 +0000 (16:30 +0200)
Fixes CID1403225

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mux.c

index e684385..3a5e876 100644 (file)
@@ -883,8 +883,11 @@ static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
 
 #if FF_API_LAVF_MERGE_SD
 FF_DISABLE_DEPRECATION_WARNINGS
-    if (st->internal->nb_bsfcs)
-        av_packet_split_side_data(pkt);
+    if (st->internal->nb_bsfcs) {
+        ret = av_packet_split_side_data(pkt);
+        if (ret < 0)
+            av_log(s, AV_LOG_WARNING, "Failed to split side data before bitstream filter\n");
+    }
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif