From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 6/7] avcodec/hap: Avoid unnecessary opt.h inclusion
Date: Fri, 26 Jan 2024 07:41:17 +0100
Message-ID: <AS8P250MB0744E86602E30D3F820D4EEF8F792@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CABLWnS8e1m1CEHvrmUr86odePpYmaJZ6JjZe-ygpAjKuYp1gnQ@mail.gmail.com>
Vittorio Giovara:
> On Wed, Jan 24, 2024 at 9:06 PM Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
>
>> It presumably exists because HapContext contains an AVClass*.
>> Yet AVClass is actually defined in log.h and even this inclusion
>> can be avoided by struct AVClass*. This avoids opt.h inclusions
>> in hap.c and hapdec.c.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>> ---
>> libavcodec/hap.h | 5 ++---
>> libavcodec/hapqa_extract_bsf.c | 2 ++
>> 2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavcodec/hap.h b/libavcodec/hap.h
>> index a888b58fd7..1de6d45428 100644
>> --- a/libavcodec/hap.h
>> +++ b/libavcodec/hap.h
>> @@ -23,10 +23,9 @@
>> #ifndef AVCODEC_HAP_H
>> #define AVCODEC_HAP_H
>>
>> +#include <stddef.h>
>> #include <stdint.h>
>>
>> -#include "libavutil/opt.h"
>> -
>> #include "bytestream.h"
>> #include "texturedsp.h"
>>
>> @@ -59,7 +58,7 @@ typedef struct HapChunk {
>> } HapChunk;
>>
>> typedef struct HapContext {
>> - AVClass *class;
>> + const struct AVClass *class;
>>
>> GetByteContext gbc;
>>
>> diff --git a/libavcodec/hapqa_extract_bsf.c
>> b/libavcodec/hapqa_extract_bsf.c
>> index 0d9b40aaa6..eac9eafe42 100644
>> --- a/libavcodec/hapqa_extract_bsf.c
>> +++ b/libavcodec/hapqa_extract_bsf.c
>> @@ -30,6 +30,8 @@
>> #include "bytestream.h"
>> #include "hap.h"
>>
>> +#include "libavutil/opt.h"
>>
>
> Is this include only for AVClass? Should it be log.h then?
Yes. log.h can be avoided by using struct AVClass* (there is actually
still an implicit inclusion of log.h via bytestream.h).
- 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".
next prev parent reply other threads:[~2024-01-26 6:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 19:50 [FFmpeg-devel] [PATCH 1/7] avcodec/dxvenc: Don't cast const away Andreas Rheinhardt
2024-01-24 19:52 ` [FFmpeg-devel] [PATCH 2/7] avcodec/dxvenc: Fix data races with slice threading Andreas Rheinhardt
2024-01-24 19:52 ` [FFmpeg-devel] [PATCH 3/7] avcodec/texturedspenc: Remove unused rgtc1_u_alpha encoding func Andreas Rheinhardt
2024-01-24 19:52 ` [FFmpeg-devel] [PATCH 4/7] avcodec/dxvenc, hap(dec|enc): Move TextureDSPContext to stack Andreas Rheinhardt
2024-01-24 19:52 ` [FFmpeg-devel] [PATCH 5/7] avcodec/texturedsp: Add separate TextureDSPEncContext Andreas Rheinhardt
2024-01-24 19:52 ` [FFmpeg-devel] [PATCH 6/7] avcodec/hap: Avoid unnecessary opt.h inclusion Andreas Rheinhardt
2024-01-25 19:27 ` Vittorio Giovara
2024-01-26 6:41 ` Andreas Rheinhardt [this message]
2024-01-24 19:52 ` [FFmpeg-devel] [PATCH 7/7] avcodec/texturedsp: Factor common code out Andreas Rheinhardt
2024-01-24 20:49 ` [FFmpeg-devel] [PATCH 1/7] avcodec/dxvenc: Don't cast const away Connor Worley
2024-01-25 3:04 ` Andreas Rheinhardt
2024-01-26 19:00 ` Andreas Rheinhardt
2024-01-26 19:15 ` Connor Worley
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=AS8P250MB0744E86602E30D3F820D4EEF8F792@AS8P250MB0744.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