Commit e7eb379d authored by James Almer's avatar James Almer

avformat/movenc: remove call to av_copy_packet_side_data() when concatenating eac3 syncframes

This generates a potential memory leak, and mixes side data from the last
packet with other properties from the first.

Keep all the properties from the first packet only in the output packet
instead.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 18f5256c
...@@ -520,8 +520,6 @@ concatenate: ...@@ -520,8 +520,6 @@ concatenate:
memcpy(info->pkt.data + info->pkt.size - pkt->size, pkt->data, pkt->size); memcpy(info->pkt.data + info->pkt.size - pkt->size, pkt->data, pkt->size);
info->num_blocks += num_blocks; info->num_blocks += num_blocks;
info->pkt.duration += pkt->duration; info->pkt.duration += pkt->duration;
if ((ret = av_copy_packet_side_data(&info->pkt, pkt)) < 0)
goto end;
if (info->num_blocks != 6) if (info->num_blocks != 6)
goto end; goto end;
av_packet_unref(pkt); av_packet_unref(pkt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment