From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avfillter/buffersrc: activate and EOF fix
Date: Fri, 27 Oct 2023 15:07:41 +0200
Message-ID: <CAPYw7P73S_xY3f2Z40GZ-APxda-CxtWmCtWnQbrEYFbTLJ_2MQ@mail.gmail.com> (raw)
In-Reply-To: <ZTuy4akaJTvHfOQE@phare.normalesup.org>
On Fri, Oct 27, 2023 at 2:54 PM Nicolas George <george@nsup.org> wrote:
> Paul B Mahol (12023-10-27):
> > Subject: [PATCH 1/2] avfilter/buffersrc: switch to activate
> >
> > Signed-off-by: Paul B Mahol <onemda@gmail.com>
> > ---
> >  libavfilter/buffersrc.c | 25 ++++++++++++++++---------
> >  1 file changed, 16 insertions(+), 9 deletions(-)
>
> What would be the benefit?
>
> >      if (s->eof)
> > -        return AVERROR(EINVAL);
> > +        return AVERROR_EOF;
> >
>
> AVERROR_EOF does not have a semantic for writing, only for reading, so
> no.
>
Both patches are required to fix out of memory scenario with this use case:
#!/usr/bin/env bash
which ffmpeg
if [ $# -lt 1 ] ; then
    echo "Usage: ${0} INPUT"
    echo "Example input can be generated with: "
    echo "  ffmpeg -v verbose -filter_complex
'testsrc2=r=25:s=640x480:d=470[out]' -map '[out]' -c:v libx264 -preset
superfast test_clip.mp4"
    exit 1
fi
INPUT="${1}"
COPY_OUTPUT="${INPUT}_copy.mp4"
IMG2_OUTPUT="${INPUT}_img2.jpg"
echo "Input: ${INPUT}"
# if you get ooms, feel free to utilize ulimit
# (ulimit -v 5000000 && )
valgrind --tool=massif --massif-out-file="massif.out.$(date -Iseconds)" \
ffmpeg \
  -y -ignore_unknown \
  -v verbose \
  -i "${INPUT}" \
    -c copy -map 0 \
    -t 470 \
    "${COPY_OUTPUT}" \
  -filter_complex
'[0:0]split=1[thumb_in];[thumb_in]trim=start=420:end=421,scale=720:-2:threads=1,setsar=1/1,hqdn3d,unsharp[thumb_out]'
\
    -map "[thumb_out]" \
    -vframes 1 \
    -f image2 \
  "${IMG2_OUTPUT}"
>
> Regards,
>
> --
>   Nicolas George
> _______________________________________________
> 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".
>
_______________________________________________
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:[~2023-10-27 12:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 12:38 Paul B Mahol
2023-10-27 12:53 ` Nicolas George
2023-10-27 13:07   ` Paul B Mahol [this message]
2023-10-27 13:02     ` Nicolas George
2023-10-27 13:18       ` Paul B Mahol
2023-10-27 17:51         ` Paul B Mahol
2023-10-27 17:54           ` Nicolas George
2023-10-27 22:48             ` Paul B Mahol
2023-10-29  9:38               ` Nicolas George
2023-10-29 21:46                 ` Paul B Mahol
2023-10-31 10:55     ` Nicolas George
2023-10-31 20:13       ` Paul B Mahol
2023-10-31 20:14         ` Paul B Mahol
2023-11-01 13:58         ` Nicolas George
2023-11-01 14:15           ` Paul B Mahol
2023-11-01 14:13             ` Nicolas George
2023-11-02  9:56               ` Paul B Mahol
2023-11-02  9:50                 ` Nicolas George
2023-11-02 10:00                   ` Paul B Mahol
2023-11-02 10:03                     ` Nicolas George
2023-11-02 10:18                       ` Paul B Mahol
2023-11-02 10:15                         ` Nicolas George
2023-11-02 20:05                         ` Tristan Matthews
2023-11-03 19:04                           ` Nicolas George
2023-11-03 20:47                             ` Paul B Mahol
2023-11-04 19:05                               ` Nicolas George
2023-11-01 13:48       ` Jan Ekström
2023-11-01 13:56         ` Nicolas George
2023-11-01 14:23           ` James Almer
2023-11-01 14:28             ` Nicolas George
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=CAPYw7P73S_xY3f2Z40GZ-APxda-CxtWmCtWnQbrEYFbTLJ_2MQ@mail.gmail.com \
    --to=onemda@gmail.com \
    --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