[FFmpeg-cvslog] avformat/rmdec: Use av_packet_move_ref() for packet ownership transfer
Andreas Rheinhardt
git at videolan.org
Wed Dec 4 21:44:24 EET 2019
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Dec 3 11:28:07 2019 +0100| [296f769fdca523e4ec23552ccb8e6a64bd47227f] | committer: Michael Niedermayer
avformat/rmdec: Use av_packet_move_ref() for packet ownership transfer
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=296f769fdca523e4ec23552ccb8e6a64bd47227f
---
libavformat/rmdec.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index e612c42e57..2c40b866aa 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -836,10 +836,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
if (type == 2 || vst->videobufpos == vst->videobufsize) {
vst->pkt.data[0] = vst->cur_slice-1;
- *pkt= vst->pkt;
- vst->pkt.data= NULL;
- vst->pkt.size= 0;
- vst->pkt.buf = NULL;
+ av_packet_move_ref(pkt, &vst->pkt);
if(vst->slices != vst->cur_slice) //FIXME find out how to set slices correct from the begin
memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices,
vst->videobufpos - 1 - 8*vst->slices);
More information about the ffmpeg-cvslog
mailing list