diff mbox series

[FFmpeg-devel] avformat: Find a fallback probe decoder that will also match a forced decoder's codec.

Message ID 20200601145708.202297-1-sfoss@google.com
State New
Headers show
Series [FFmpeg-devel] avformat: Find a fallback probe decoder that will also match a forced decoder's codec.
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Samuel Foss June 1, 2020, 2:57 p.m. UTC
Prevent codecpar->codec_id from getting out of sync with the codec instantiated for probing.
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer June 2, 2020, 9:33 p.m. UTC | #1
On Mon, Jun 01, 2020 at 10:57:08AM -0400, sfoss wrote:
> Prevent codecpar->codec_id from getting out of sync with the codec instantiated for probing.
> ---
>  libavformat/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

is it intended that the author of this patch is sfoss instead 
of a more traditional first / last name ?

thx

[...]
Samuel Foss June 3, 2020, 11:15 a.m. UTC | #2
No - sorry, this inherited my existing global git configs.

On Tue, Jun 2, 2020 at 5:33 PM Michael Niedermayer <michael@niedermayer.cc>
wrote:

> On Mon, Jun 01, 2020 at 10:57:08AM -0400, sfoss wrote:
> > Prevent codecpar->codec_id from getting out of sync with the codec
> instantiated for probing.
> > ---
> >  libavformat/utils.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> is it intended that the author of this patch is sfoss instead
> of a more traditional first / last name ?
>
> thx
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Everything should be made as simple as possible, but not simpler.
> -- Albert Einstein
> _______________________________________________
> 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".
diff mbox series

Patch

diff --git a/libavformat/utils.c b/libavformat/utils.c
index c9385318f6..b3d902c6b5 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -219,7 +219,7 @@  static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st,
         const AVCodec *probe_codec = NULL;
         void *iter = NULL;
         while ((probe_codec = av_codec_iterate(&iter))) {
-            if (probe_codec->id == codec_id &&
+            if (probe_codec->id == codec->id &&
                     av_codec_is_decoder(probe_codec) &&
                     !(probe_codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_EXPERIMENTAL))) {
                 return probe_codec;