ffmpeg: fix streamcopy with side data
[ffmpeg.git] / ffmpeg.c
index b82d2be..60b10cc 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -627,6 +627,8 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
                 a = AVERROR(ENOMEM);
         }
         if (a > 0) {
+            pkt->side_data = NULL;
+            pkt->side_data_elems = 0;
             av_free_packet(pkt);
             new_pkt.buf = av_buffer_create(new_pkt.data, new_pkt.size,
                                            av_buffer_default_free, NULL, 0);