From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg: stop using av_stream_get_parser()
Date: Thu, 18 Aug 2022 17:19:14 +0200
Message-ID: <20220818151914.GG2088045@pb2> (raw)
In-Reply-To: <20220818134605.12583-2-anton@khirnov.net>
[-- Attachment #1.1: Type: text/plain, Size: 1362 bytes --]
On Thu, Aug 18, 2022 at 03:46:03PM +0200, Anton Khirnov wrote:
> The parser is internal to the demuxer, so its state at any particular
> point is not well-defined for the caller. Additionally, it is being
> accessed from the main thread, while demuxing runs in a separate thread.
>
> Use a separate parser owned by ffmpeg.c to retrieve the same
> information.
>
> Fixes races, e.g. in:
> - fate-h264-brokensps-2580
> - fate-h264-extradata-reload
> - fate-iv8-demux
> - fate-m4v-cfr
> - fate-m4v
> ---
> fftools/ffmpeg.c | 33 +++++++++++++++++++++++++++++++--
> fftools/ffmpeg.h | 9 +++++++++
> fftools/ffmpeg_opt.c | 9 +++++++++
> 3 files changed, 49 insertions(+), 2 deletions(-)
This segfaults:
./ffmpeg -max_alloc 100000 -i ~/tickets/2950/mpeg2_fuzz.mpg -max_muxing_queue_size 8000 -f null -
==25621== Invalid read of size 4
==25621== at 0x2F3018: add_input_streams (in ffmpeg_g)
==25621== by 0x2F3BB0: open_input_file (in ffmpeg_g)
==25621== by 0x2FA93B: ffmpeg_parse_options (in ffmpeg_g)
==25621== by 0x2E74B4: main (in ffmpeg_g)
==25621== Address 0x14 is not stack'd, malloc'd or (recently) free'd
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-08-18 15:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 13:46 [FFmpeg-devel] [PATCH 1/4] lavf: deprecate av_stream_get_end_pts() Anton Khirnov
2022-08-18 13:46 ` [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg: stop using av_stream_get_parser() Anton Khirnov
2022-08-18 13:58 ` Andreas Rheinhardt
2022-08-18 16:44 ` James Almer
2022-08-18 17:08 ` Andreas Rheinhardt
2022-08-18 14:14 ` Anton Khirnov
2022-08-18 14:34 ` Andreas Rheinhardt
2022-08-18 15:19 ` Michael Niedermayer [this message]
2022-08-18 13:46 ` [FFmpeg-devel] [PATCH 3/4] lavf: deprecate av_stream_get_parser() Anton Khirnov
2022-08-18 13:46 ` [FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg: call av_guess_frame_rate() when opening the file Anton Khirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220818151914.GG2088045@pb2 \
--to=michael@niedermayer.cc \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git