diff --git a/ffmpeg.c b/ffmpeg.c
index 051e279763e2ca351ec3e1d8fa9042ec0019f2c0..c97f46285ee78566f1cd848638b0aa2e1df1ab5d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3323,6 +3323,8 @@ static int process_input(int file_index)
 
     /* add the stream-global side data to the first packet */
     if (ist->nb_packets == 1)
+        if (ist->st->nb_side_data)
+            av_packet_split_side_data(&pkt);
         for (i = 0; i < ist->st->nb_side_data; i++) {
             AVPacketSideData *src_sd = &ist->st->side_data[i];
             uint8_t *dst_data;