Browse Source

avformat/rmdec: Use av_packet_move_ref() for packet ownership transfer

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Andreas Rheinhardt Michael Niedermayer 6 years ago
parent
commit
296f769fdc
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      libavformat/rmdec.c

+ 1
- 4
libavformat/rmdec.c View File

@@ -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);


Loading…
Cancel
Save