diff mbox series

[FFmpeg-devel,2/2] libavcodec/dnxuc_parser: Use av_fourcc2str instead of av_fourcc_make_string

Message ID 7d6bc43bd1227e67cf5e8fc1d101950439a7d273.1728766582.git.eclipse7@gmx.net
State New
Headers show
Series [FFmpeg-devel,1/2] lavc/dnxuc_parser: Adhere to av_fourcc_make_string API | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Alexander Strasser Oct. 12, 2024, 9:08 p.m. UTC
The string representation of the FourCC is only used once for logging.
---

Could also merge this with the first patch in this series and make
it a single patch.

Or drop this one.

I don't have a strong opinion on these details.

 libavcodec/dnxuc_parser.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--

Comments

Marvin Scholz Oct. 12, 2024, 9:18 p.m. UTC | #1
On 12 Oct 2024, at 23:08, Alexander Strasser via ffmpeg-devel wrote:

> The string representation of the FourCC is only used once for logging.
> ---
>
> Could also merge this with the first patch in this series and make
> it a single patch.
>
> Or drop this one.
>
> I don't have a strong opinion on these details.

LGTM, thanks.

Maybe just squash them into one commit.

>
>  libavcodec/dnxuc_parser.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/libavcodec/dnxuc_parser.c b/libavcodec/dnxuc_parser.c
> index 896758c794..12472c7a2d 100644
> --- a/libavcodec/dnxuc_parser.c
> +++ b/libavcodec/dnxuc_parser.c
> @@ -95,11 +95,8 @@ static int dnxuc_parse(AVCodecParserContext *s,
>      pc->nr_bytes = AV_RL32(buf+29+icmp_offset) - 8;
>
>      if (!avctx->codec_tag) {
> -        char fourcc_buf[AV_FOURCC_MAX_STRING_SIZE];
> -
> -        av_fourcc_make_string(fourcc_buf, pc->fourcc_tag);
>          av_log(avctx, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n",
> -            fourcc_buf,
> +            av_fourcc2str(pc->fourcc_tag),
>              pc->width, pc->height,
>              (pc->nr_bytes*8)/(pc->width*pc->height),
>              pc->nr_bytes);
> --
> _______________________________________________
> 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".
Martin Schitter Oct. 12, 2024, 9:36 p.m. UTC | #2
On 12.10.24 23:18, epirat07@gmail.com wrote:
> Maybe just squash them into one commit.

Yes -- this looks like the most desirable solution.

And thanks to Alex for the suggested improvement!

Martin
Alexander Strasser Oct. 13, 2024, 9:04 p.m. UTC | #3
On 2024-10-12 23:36 +0200, martin schitter wrote:
> On 12.10.24 23:18, epirat07@gmail.com wrote:
> > Maybe just squash them into one commit.
>
> Yes -- this looks like the most desirable solution.
>
> And thanks to Alex for the suggested improvement!

Thank you Martin and Marvin for the quick response!

Pushed a squashed version with a reworded commit message.


  Alexander
diff mbox series

Patch

diff --git a/libavcodec/dnxuc_parser.c b/libavcodec/dnxuc_parser.c
index 896758c794..12472c7a2d 100644
--- a/libavcodec/dnxuc_parser.c
+++ b/libavcodec/dnxuc_parser.c
@@ -95,11 +95,8 @@  static int dnxuc_parse(AVCodecParserContext *s,
     pc->nr_bytes = AV_RL32(buf+29+icmp_offset) - 8;

     if (!avctx->codec_tag) {
-        char fourcc_buf[AV_FOURCC_MAX_STRING_SIZE];
-
-        av_fourcc_make_string(fourcc_buf, pc->fourcc_tag);
         av_log(avctx, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n",
-            fourcc_buf,
+            av_fourcc2str(pc->fourcc_tag),
             pc->width, pc->height,
             (pc->nr_bytes*8)/(pc->width*pc->height),
             pc->nr_bytes);