On Thu, 15 Oct 2015 02:26:45 +0200
Luca Barbato <[email protected]> wrote:

> ---
>  libavformat/mux.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/mux.c b/libavformat/mux.c
> index e86d202..bdcc38c 100644
> --- a/libavformat/mux.c
> +++ b/libavformat/mux.c
> @@ -416,12 +416,9 @@ int ff_interleave_add_packet(AVFormatContext *s, 
> AVPacket *pkt,
>      this_pktl      = av_mallocz(sizeof(AVPacketList));
>      if (!this_pktl)
>          return AVERROR(ENOMEM);
> -    this_pktl->pkt = *pkt;
> -    pkt->buf       = NULL;
> -    pkt->side_data = NULL;
> -    pkt->side_data_elems = 0;
> +
>      // Duplicate the packet if it uses non-allocated memory
> -    if ((ret = av_dup_packet(&this_pktl->pkt)) < 0) {
> +    if ((ret = av_packet_ref(&this_pktl->pkt, pkt)) < 0) {
>          av_free(this_pktl);
>          return ret;
>      }

I don't really know what's going on. Is it a problem that pkt->buf etc.
are not reset after this? It looks like the intention was actually to
transfer ownership?
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to