diff mbox series

[FFmpeg-devel,1/2] avformat/file: Constify android content protocol

Message ID GV1P250MB0737A4A06332A1256DC885838F302@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit ebe832640945c531b0ee9b82ae745a11cd9f8e71
Headers show
Series [FFmpeg-devel,1/2] avformat/file: Constify android content protocol | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 23, 2024, 12:19 p.m. UTC
(The discrepancy between the definition and the declaration
in protocols.c is actually UB.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
This and the next patch have not been tested (apart from "it compiles
when the android content protocol is disabled").

 libavformat/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt March 25, 2024, 1:55 a.m. UTC | #1
Andreas Rheinhardt:
> (The discrepancy between the definition and the declaration
> in protocols.c is actually UB.)
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> This and the next patch have not been tested (apart from "it compiles
> when the android content protocol is disabled").
> 
>  libavformat/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/file.c b/libavformat/file.c
> index dd5819c06f..8f3b35c795 100644
> --- a/libavformat/file.c
> +++ b/libavformat/file.c
> @@ -670,7 +670,7 @@ done:
>      return ret;
>  }
>  
> -URLProtocol ff_android_content_protocol = {
> +const URLProtocol ff_android_content_protocol = {
>      .name                = "content",
>      .url_open            = android_content_open,
>      .url_read            = file_read,

Will apply this patchset tomorrow unless there are objections.

- Andreas
Matthieu Bouron March 25, 2024, 8:06 a.m. UTC | #2
On Mon, Mar 25, 2024 at 02:55:32AM +0100, Andreas Rheinhardt wrote:
> Andreas Rheinhardt:
> > (The discrepancy between the definition and the declaration
> > in protocols.c is actually UB.)
> > 
> > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> > ---
> > This and the next patch have not been tested (apart from "it compiles
> > when the android content protocol is disabled").
> > 
> >  libavformat/file.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/file.c b/libavformat/file.c
> > index dd5819c06f..8f3b35c795 100644
> > --- a/libavformat/file.c
> > +++ b/libavformat/file.c
> > @@ -670,7 +670,7 @@ done:
> >      return ret;
> >  }
> >  
> > -URLProtocol ff_android_content_protocol = {
> > +const URLProtocol ff_android_content_protocol = {
> >      .name                = "content",
> >      .url_open            = android_content_open,
> >      .url_read            = file_read,
> 
> Will apply this patchset tomorrow unless there are objections.

Patchset tested locally and working as intended. LGTM.
Thanks.
diff mbox series

Patch

diff --git a/libavformat/file.c b/libavformat/file.c
index dd5819c06f..8f3b35c795 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -670,7 +670,7 @@  done:
     return ret;
 }
 
-URLProtocol ff_android_content_protocol = {
+const URLProtocol ff_android_content_protocol = {
     .name                = "content",
     .url_open            = android_content_open,
     .url_read            = file_read,