From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 1/7] avformat/apvenc: Only allow APV Date: Sun, 27 Apr 2025 22:48:43 +0200 Message-ID: <GV1P250MB0737988ADFA6A6C036131E938F862@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <a51b592d-eaab-417f-9ae6-21da1c0d17f5@jkqxz.net> Mark Thompson: > On 27/04/2025 19:42, Andreas Rheinhardt wrote: >> Patches attached. >> >> - Andreas > >> [PATCH 1/7] avformat/apvenc: Only allow APV > > Oops, sure. > >> [PATCH 2/7] avformat/apvenc: Remove unused header > > Sure. > >> [PATCH 3/7] avformat/apvdec: Use ffio_read_size() > > Is there a cleaner way to discard very short files without reading them? The minimum size of a valid is significantly larger than this, and an early failure would be nice rather than it get packetised and something later has to realise it's bad. There is avio_size(). But I know of no demuxer that uses it to discard small files. (What is the minimum size of a valid file?) > >> [PATCH 4/7] avformat/apvdec: Remove inappropriate flags > > What does the GENERIC_INDEX flag affect here? > With the flag set, the demux code adds index entries for keyframes based on AVPacket.pos. For this demuxer, AVPacket.pos points to the position of the signature, not of the access unit size field which is where the read_packet() code expects to be when called. So with the current code, seeking to an already encountered place will lead to an APV_SIGNATURE being mistaken for an access unit size. You can see this for yourself with ffmpeg -stream_loop 50 -i $(FATE_SUITE)/apv/profile_422-10.apv -c copy -f null - An alternative would be to decrement AVPacket.pos by four. > Currently mpv does successfully seek in a raw file (to already-seen places), but this may or may not be related. IIRC mpv caches a certain amount of data (in the form of AVPackets IIRC) in order to enable short seeks backwards and forwards from the current position. I don't think it calls the avformat seek functions for your seeks. - Andreas _______________________________________________ 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".
prev parent reply other threads:[~2025-04-27 20:48 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-04-27 18:42 Andreas Rheinhardt 2025-04-27 19:41 ` Mark Thompson 2025-04-27 20:48 ` Andreas Rheinhardt [this message]
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=GV1P250MB0737988ADFA6A6C036131E938F862@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.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