Re: [FFmpeg-devel] [PATCH 2/2] avformat/tee: Use ref instead copy in write_packet
On Thu, 5 May 2016, Nicolas George wrote: Le quartidi 14 floréal, an CCXXIV, sebechlebsky...@gmail.com a écrit : From: Jan SebechlebskyReplace av_copy_packet and deprecated av_dup_packet by creating reference using av_packet_ref. Signed-off-by: Jan Sebechlebsky --- This should be effectively the same as calling av_packet_clone, but without dynamic memory allocation (reuses local AVPacket pkt). libavformat/tee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Looks right, thanks. Applied, thanks. Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avformat/tee: Use ref instead copy in write_packet
Le quartidi 14 floréal, an CCXXIV, sebechlebsky...@gmail.com a écrit : > From: Jan Sebechlebsky> > Replace av_copy_packet and deprecated av_dup_packet by > creating reference using av_packet_ref. > > Signed-off-by: Jan Sebechlebsky > --- > This should be effectively the same as calling av_packet_clone, > but without dynamic memory allocation (reuses local AVPacket pkt). > > libavformat/tee.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Looks right, thanks. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avformat/tee: Use ref instead copy in write_packet
From: Jan SebechlebskyReplace av_copy_packet and deprecated av_dup_packet by creating reference using av_packet_ref. Signed-off-by: Jan Sebechlebsky --- This should be effectively the same as calling av_packet_clone, but without dynamic memory allocation (reuses local AVPacket pkt). libavformat/tee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 879d5b8..1891f9b 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -527,8 +527,8 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt) if (s2 < 0) continue; -if ((ret = av_copy_packet(, pkt)) < 0 || -(ret = av_dup_packet())< 0) +memset(, 0, sizeof(AVPacket)); +if ((ret = av_packet_ref(, pkt)) < 0) if (!ret_all) { ret_all = ret; continue; -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel