From: Paul B Mahol <onemda@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 1/8] lavc/avcodec: simplify codec id/type validity checking Date: Sun, 5 Jun 2022 10:55:13 +0200 Message-ID: <CAPYw7P54i_k81odnErn8QTZptxmPHCn4G4sHae6kobDvNrQRWw@mail.gmail.com> (raw) In-Reply-To: <165441720181.5088.3725748658698613904@lain.red.khirnov.net> On Sun, Jun 5, 2022 at 10:20 AM Anton Khirnov <anton@khirnov.net> wrote: > Quoting Soft Works (2022-06-05 09:54:51) > > > > > > > -----Original Message----- > > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > Anton > > > Khirnov > > > Sent: Sunday, June 5, 2022 9:01 AM > > > To: FFmpeg development discussions and patches < > ffmpeg-devel@ffmpeg.org> > > > Subject: Re: [FFmpeg-devel] [PATCH 1/8] lavc/avcodec: simplify codec > id/type > > > validity checking > > > > > > Quoting Soft Works (2022-06-05 07:23:18) > > > > This is causing a regression in ffprobe. > > > > > > > > The commit removes the special-case check for > AVMEDIA_TYPE_ATTACHMENT which > > > > was required for ffprobe and had been added with > > > e83c716e16c52fa56a78274408f7628e5dc719da. > > > > > > > > The demand from the commit message is not yet guaranteed to be > fulfilled: > > > > > > > > > On entry to avcodec_open2(), the type and id either have to be > > > > > UNKNOWN/NONE or have to match the codec to be used. > > > > > > > > I have one verified example (maybe a second will follow), which is > an MKV > > > with > > > > an attachment "stream" of type "text". > > > > The found codec will be textdec of type 'subtitle' even though the > stream > > > type > > > > is attachment. Without the special condition for attachment streams, > this > > > > is now causing ffprobe to error out with non-zero exit code and > incomplete > > > > output. > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > Example: > > > > > > > > [...] > > > > Stream #0:9: Attachment: text > > > > Metadata: > > > > filename : textfile.text > > > > mimetype : text/plain > > > > [text @ 000001AC32310340] Codec type or id mismatches > > > > Could not open codec for input stream 9 > > > > > ------------------------------------------------------------------------ > > > > > > This sounds very much like a bug in ffprobe. It makes no sense to call > > > avcodec_open2() with the AVMEDIA_TYPE_ATTACHMENT type. > > > > You make a behavioral change to an API function that had this behavior > > established and constant over more than 10 years, and when that change > > breaks functionality, it's the callers' fault? > > How does this go together with all that peanut counting of major, minor > > and micro version numbers per library? What is this versioning good for, > > when you can make breaking changes and declare the breakage as bugs? > > We maintain compatibility for valid API usage. We do not maintain bug > compatibility. > > I fail to see how calling avcodec_open2() with AVMEDIA_TYPE_ATTACHMENT > is valid API usage. What do you expect it to do? There are no > AVMEDIA_TYPE_ATTACHMENT decoders. > > More generally, arguments along the line of "change <X> is needed to > keep program <Y> working>" on their own sound very shady to me and > suggest that perhaps program <Y> should not be doing whatever it is > doing. > You broke existing functionality, fix it ASAP or revert those changes! > -- > Anton Khirnov > _______________________________________________ > 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:[~2022-06-05 8:52 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-23 15:57 Anton Khirnov 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 2/8] lavc/avcodec: only allocate the encoding frame for encoders Anton Khirnov 2022-03-23 16:29 ` James Almer 2022-04-11 8:39 ` [FFmpeg-devel] [PATCH] lavc/encode: drop EncodeSimpleContext Anton Khirnov 2022-04-11 9:16 ` Paul B Mahol 2022-04-11 16:32 ` James Almer 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 3/8] lavc: move default get_buffer2() to its own file Anton Khirnov 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 4/8] lavc/snow: only allocate mconly_picture for decoding Anton Khirnov 2022-03-24 23:07 ` Michael Niedermayer 2022-04-11 8:49 ` [FFmpeg-devel] [PATCH] " Anton Khirnov 2022-04-11 19:28 ` Michael Niedermayer 2022-04-13 10:21 ` Anton Khirnov 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 5/8] lavc/encode: add an encoder-specific get_buffer() variant Anton Khirnov 2022-03-23 16:26 ` James Almer 2022-04-11 9:05 ` [FFmpeg-devel] [PATCH] " Anton Khirnov 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 6/8] lavc/avcodec: only allocate decoding packets for decoders Anton Khirnov 2022-04-13 14:51 ` Andreas Rheinhardt 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 7/8] lavc/pthread_frame: do not copy AVCodecInternal contents Anton Khirnov 2022-03-23 15:57 ` [FFmpeg-devel] [PATCH 8/8] lavc: drop a confusing message about "thread emulation" Anton Khirnov 2022-04-13 10:23 ` [FFmpeg-devel] [PATCH 1/8] lavc/avcodec: simplify codec id/type validity checking Anton Khirnov 2022-06-05 5:23 ` Soft Works 2022-06-05 7:01 ` Anton Khirnov 2022-06-05 7:54 ` Soft Works 2022-06-05 7:59 ` Soft Works 2022-06-05 8:20 ` Anton Khirnov 2022-06-05 8:55 ` Paul B Mahol [this message] 2022-06-05 8:55 ` Soft Works 2022-06-05 9:15 ` Soft Works 2022-06-05 10:42 ` Anton Khirnov 2022-06-05 10:55 ` Soft Works 2022-06-05 11:10 ` Soft Works 2022-06-05 13:20 ` Anton Khirnov 2022-06-05 14:06 ` Soft Works
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=CAPYw7P54i_k81odnErn8QTZptxmPHCn4G4sHae6kobDvNrQRWw@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