On Wed, Sep 04, 2019 at 12:36:16PM -0300, James Almer wrote:
> On 9/4/2019 12:27 PM, lance.lmw...@gmail.com wrote:
> > From: Limin Wang <lance.lmw...@gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmw...@gmail.com>
> > ---
> >  libavformat/movenc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > index edddfee..503f099 100644
> > --- a/libavformat/movenc.c
> > +++ b/libavformat/movenc.c
> > @@ -518,7 +518,7 @@ concatenate:
> >          memcpy(info->pkt.data + info->pkt.size - pkt->size, pkt->data, 
> > pkt->size);
> >          info->num_blocks += num_blocks;
> >          info->pkt.duration += pkt->duration;
> > -        if ((ret = av_copy_packet_side_data(&info->pkt, pkt)) < 0)
> > +        if ((ret = av_packet_copy_props(&info->pkt, pkt)) < 0)
> 
> av_packet_copy_props() will overwrite almost every info->pkt field,
> which in this case will result in lost information. Just look at the
> line above accumulating packet durations before this call.
> 
> I don't know what could be the cleanest solution for this. I suggested
> adding a replacement for av_copy_packet_side_data() using the
> av_packet_* namespace, but the idea was rejected.
I want to use the av_copy_packet_side_data() in other place, however it's 
deprecated.
By the log, it recomment to use av_packet_copy_props, but the function isn't 
replacement. 
Or if add av_packet_copy_side_data() to replace, why it's rejected? 

> 
> >              goto end;
> >          if (info->num_blocks != 6)
> >              goto end;
> > 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to