[FFmpeg-devel] [PATCH] avformat/utils: Use av_packet_move_ref for packet ownership transfer

Michael Niedermayer michael at niedermayer.cc
Thu Apr 4 21:29:34 EEST 2019


On Thu, Apr 04, 2019 at 10:55:03AM -0400, Andriy Gelman wrote:
> From: Andriy Gelman <andriy.gelman at gmail.com>
> 
> This commit replaces packet assignment operator with av_packet_move_ref when there
> is a packet ownership transfer.
> ---
> 
> Aims to address a TODO in libavformat/utils.c about using av_packet_mov_ref
> instead of assignment operator.
> 
>  libavformat/utils.c | 28 +++++++++++++++-------------
>  1 file changed, 15 insertions(+), 13 deletions(-)

this changes the behavior:
./ffprobe ~/tickets/4221/teletext-streams-misrecognized.ts

https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4221/teletext-streams-misrecognized.ts

before:
    Stream #0:0[0x65]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x68]: Unknown: none
    Stream #0:2[0x6a]: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
    Stream #0:3[0x67]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:4[0x66]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:5[0x69]: Subtitle: dvb_subtitle
    
afterwards:
    Stream #0:0[0x65]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x68]: Unknown: none
    Stream #0:2[0x6a]: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
    Stream #0:3[0x67]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:4[0x66]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:5[0x69]: Unknown: none


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190404/77e95428/attachment.sig>


More information about the ffmpeg-devel mailing list