From: Marton Balint <cus@passwd.hu> To: ffmpeg-devel@ffmpeg.org Cc: Marton Balint <cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH 2/3] Revert "avformat/demux: Make read_frame_internal() return AVERREOR(EAGAIN) on stuck empty input parser" Date: Mon, 27 Jun 2022 22:02:40 +0200 Message-ID: <20220627200241.7102-2-cus@passwd.hu> (raw) In-Reply-To: <20220627200241.7102-1-cus@passwd.hu> Hides the underlying real problem with a demuxer returning 0 sized packets. This reverts commit 02699490c14e86105104940c009953081f69432c. --- libavformat/demux.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index 57720f4311..1620716716 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1235,15 +1235,11 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) FFFormatContext *const si = ffformatcontext(s); int ret, got_packet = 0; AVDictionary *metadata = NULL; - int empty = 0; while (!got_packet && !si->parse_queue.head) { AVStream *st; FFStream *sti; - if (empty > 1) - return AVERROR(EAGAIN); - /* read next packet */ ret = ff_read_packet(s, pkt); if (ret < 0) { @@ -1334,8 +1330,6 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) } got_packet = 1; } else if (st->discard < AVDISCARD_ALL) { - if (pkt->size == 0) - empty ++; if ((ret = parse_packet(s, pkt, pkt->stream_index, 0)) < 0) return ret; st->codecpar->sample_rate = sti->avctx->sample_rate; -- 2.35.3 _______________________________________________ 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-06-27 20:03 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-27 20:02 [FFmpeg-devel] [PATCH 1/3] Revert "avformat/demux: Count EAGAIN as 100 bytes in relation to read limit in avformat_find_stream_info()" Marton Balint 2022-06-27 20:02 ` Marton Balint [this message] 2022-06-27 20:02 ` [FFmpeg-devel] [PATCH 3/3] avformat/mov: disallow a zero sample size in trun atoms Marton Balint 2022-06-28 3:03 ` "zhilizhao(赵志立)" 2022-07-06 21:38 ` Marton Balint 2022-06-28 5:15 ` [FFmpeg-devel] [PATCH 1/3] Revert "avformat/demux: Count EAGAIN as 100 bytes in relation to read limit in avformat_find_stream_info()" 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=20220627200241.7102-2-cus@passwd.hu \ --to=cus@passwd.hu \ --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