avformat/movenc: move the concatenated eac3 packet reference

Simplifies code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/283/head
James Almer 7 years ago
parent eeca8921e2
commit 935a9986fc
  1. 5
      libavformat/movenc.c

@ -491,10 +491,7 @@ concatenate:
if (info->num_blocks != 6) if (info->num_blocks != 6)
goto end; goto end;
av_packet_unref(pkt); av_packet_unref(pkt);
ret = av_packet_ref(pkt, &info->pkt); av_packet_move_ref(pkt, &info->pkt);
if (ret < 0)
goto end;
av_packet_unref(&info->pkt);
info->num_blocks = 0; info->num_blocks = 0;
} }
ret = pkt->size; ret = pkt->size;

Loading…
Cancel
Save