]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/sapenc.c
hevc: fix RAP_B_Bossen
[ffmpeg] / libavformat / sapenc.c
index 82a6ef67fd5d905881767e881e71985c60df3c92..f90955790d448687f6d0f887e8a9d7404b2ce874 100644 (file)
@@ -134,7 +134,7 @@ static int sap_write_header(AVFormatContext *s)
         freeaddrinfo(ai);
     }
 
-    contexts = av_mallocz(sizeof(AVFormatContext*) * s->nb_streams);
+    contexts = av_mallocz_array(s->nb_streams, sizeof(AVFormatContext*));
     if (!contexts) {
         ret = AVERROR(ENOMEM);
         goto fail;
@@ -256,7 +256,7 @@ static int sap_write_packet(AVFormatContext *s, AVPacket *pkt)
         sap->last_time = now;
     }
     rtpctx = s->streams[pkt->stream_index]->priv_data;
-    return ff_write_chained(rtpctx, 0, pkt, s);
+    return ff_write_chained(rtpctx, 0, pkt, s, 0);
 }
 
 AVOutputFormat ff_sap_muxer = {