Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Scott Theisen <scott.the.elm@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] lavu: make av_get_media_type_string() never return NULL
Date: Tue, 1 Feb 2022 20:58:06 -0500
Message-ID: <816bc1cd-db7c-2091-5b13-6c54560110e4@gmail.com> (raw)
In-Reply-To: <bdae01aa-d492-be3e-3dd3-6c4bafd7d5f3@gmail.com>

On 2/1/22 17:34, James Almer wrote:
> This is an API breakage, so it's not ok. 
I'm new, so would this require a bump to the MINOR or MICRO version number?

> The doxy states it returns NULL if media_type is unknown, so you're 
> expected to check the returned pointer before trying to use it. 

git grep -E --count "av_get_media_type_string"

doc/APIchanges:1
doc/examples/demuxing_decoding.c:5
doc/examples/extract_mvs.c:2
fftools/cmdutils.c:1
fftools/cmdutils.h:1
fftools/ffmpeg.c:5
fftools/ffmpeg_opt.c:1
fftools/ffplay.c:2
fftools/ffprobe.c:3
libavcodec/avcodec.c:1
libavcodec/tests/avcodec.c:1
libavdevice/dshow.c:2
libavfilter/avfilter.c:2
libavfilter/avfiltergraph.c:2
libavfilter/src_movie.c:3
libavformat/avienc.c:1
libavformat/flvenc.c:1
libavformat/framehash.c:1
libavformat/mov.c:1
libavformat/mpegenc.c:1
libavformat/mpegts.c:1
libavformat/mxfdec.c:1
libavformat/segment.c:1
libavformat/tee.c:1
libavformat/uncodedframecrcenc.c:1
libavutil/avutil.h:1
libavutil/utils.c:1

44 total - 1 non-code - 1 prototype - 1 definition + 4 via macro - 1 
macro = 44 uses

The following uses of av_get_media_type_string() do not check for null:
doc/examples/demuxing_decoding.c: 5
doc/examples/extract_mvs.c: 2
fftools/cmdutils.c: 2 via the define in cmdutils.h
fftools/ffmpeg.c: 7, 2 via the define in cmdutils.h
fftools/ffmpeg_opt.c:1
fftools/ffplay.c:2
libavfilter/avfiltergraph.c:2
libavfilter/src_movie.c:3
libavformat/flvenc.c:1
libavformat/framehash.c:1
libavformat/mov.c:1
libavformat/mpegenc.c:1
libavformat/mpegts.c:1
libavformat/mxfdec.c:1
libavformat/segment.c:1
libavformat/tee.c:1

32/44 uses do not check for null.


libavcodec/tests/avcodec.c: this use is a workaround to 
av_get_media_type_string() returning null; checked 3 times


Let me know which version number to bump and I will submit a new version 
that also removes the now redundant null checks from the rest of the code.

Thanks,
Scott
_______________________________________________
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".

  reply	other threads:[~2022-02-02  1:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 22:30 Scott Theisen
2022-02-01 22:34 ` James Almer
2022-02-02  1:58   ` Scott Theisen [this message]
2022-02-02  2:06     ` James Almer
2022-02-02  2:42       ` Scott Theisen
2022-02-02  2:13     ` Andreas Rheinhardt
2022-02-23  7:52     ` Anton Khirnov
2022-02-28 21:06       ` Scott Theisen
2022-02-03 20:09 ` [FFmpeg-devel] [PATCH v2] create av_media_type_get_string() Scott Theisen
2022-02-03 20:09   ` [FFmpeg-devel] [PATCH 1/2] libavutil: " Scott Theisen
2022-02-03 20:09   ` [FFmpeg-devel] [PATCH 2/2] replace av_get_media_type_string() with av_media_type_get_string() Scott Theisen
2022-02-13 21:52 ` [FFmpeg-devel] [PATCH v3] create av_media_type_get_string() Scott Theisen
2022-02-13 21:52   ` [FFmpeg-devel] [PATCH v3 1/2] libavutil: " Scott Theisen
2022-02-13 21:52   ` [FFmpeg-devel] [PATCH v3 2/2] av_get_media_type_string(): replace with av_media_type_get_string() Scott Theisen
2022-05-15 19:55 ` [FFmpeg-devel] [Patch v4 0/2] create av_media_type_get_string() Scott Theisen
2022-05-15 19:55   ` [FFmpeg-devel] [PATCH v4 1/2] libavutil: " Scott Theisen
2022-05-15 19:55   ` [FFmpeg-devel] [PATCH v4 2/2] av_get_media_type_string(): replace with av_media_type_get_string() Scott Theisen
2022-06-01 19:22 ` [FFmpeg-devel] [PATCH] " Scott Theisen
2022-09-16 17:32   ` [FFmpeg-devel] [PATCH v2] " Scott Theisen

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=816bc1cd-db7c-2091-5b13-6c54560110e4@gmail.com \
    --to=scott.the.elm@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