diff mbox series

[FFmpeg-devel] avformat: fix use of undeclared identifier error when compiling Chromium

Message ID 20221108194836.1919-1-uioptt24@gmail.com
State New
Headers show
Series [FFmpeg-devel] avformat: fix use of undeclared identifier error when compiling Chromium | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to run configure
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

揚帆起航 Nov. 8, 2022, 7:48 p.m. UTC
From: gz83 <uioptt24@gmail.com>

Cross-compiling Chromium on Ubuntu 22.04 will encounter errors related
to avformat, because Chromium regularly synchronizes upstream changes,
so now submit code directly to upstream
---
 libavformat/flac_picture.c |  3 ++-
 libavformat/matroskadec.c  | 10 +++++-----
 libavformat/mov.c          | 11 ++++++-----
 libavformat/oggdec.c       |  1 +
 libavformat/riff.c         |  1 +
 5 files changed, 15 insertions(+), 11 deletions(-)

Comments

zhilizhao(赵志立) Nov. 9, 2022, 2:22 a.m. UTC | #1
> On Nov 9, 2022, at 03:48, uioptt24@gmail.com wrote:
> 
> From: gz83 <uioptt24@gmail.com>
> 
> Cross-compiling Chromium on Ubuntu 22.04 will encounter errors related
> to avformat, because Chromium regularly synchronizes upstream changes,
> so now submit code directly to upstream
> ---
> libavformat/flac_picture.c |  3 ++-
> libavformat/matroskadec.c  | 10 +++++-----
> libavformat/mov.c          | 11 ++++++-----
> libavformat/oggdec.c       |  1 +
> libavformat/riff.c         |  1 +
> 5 files changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
> index b33fee75b4..36d190fdc7 100644
> --- a/libavformat/flac_picture.c
> +++ b/libavformat/flac_picture.c
> @@ -19,9 +19,10 @@
>  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>  */
> 
> -#include "libavutil/intreadwrite.h"
> #include "libavcodec/bytestream.h"
> +#include "libavcodec/defs.h"
> #include "libavcodec/png.h"
> +#include "libavutil/intreadwrite.h"
> #include "avformat.h"
> #include "demux.h"
> #include "flac_picture.h"
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index d582f566a2..f7bb962941 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -34,6 +34,11 @@
> #include <inttypes.h>
> #include <stdio.h>
> 
> +#include "libavcodec/bytestream.h"
> +#include "libavcodec/defs.h"
> +#include "libavcodec/flac.h"
> +#include "libavcodec/mpeg4audio.h"
> +#include "libavcodec/packet_internal.h"
> #include "libavutil/avstring.h"
> #include "libavutil/base64.h"
> #include "libavutil/bprint.h"
> @@ -50,11 +55,6 @@
> #include "libavutil/time_internal.h"
> #include "libavutil/spherical.h"
> 
> -#include "libavcodec/bytestream.h"
> -#include "libavcodec/flac.h"
> -#include "libavcodec/mpeg4audio.h"
> -#include "libavcodec/packet_internal.h"
> -
> #include "avformat.h"
> #include "avio_internal.h"
> #include "demux.h"
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 1f436e21d6..39d2c71edb 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -29,6 +29,12 @@
> #include <limits.h>
> #include <stdint.h>
> 
> +#include "libavcodec/ac3tab.h"
> +#include "libavcodec/defs.h"
> +#include "libavcodec/flac.h"
> +#include "libavcodec/hevc.h"
> +#include "libavcodec/mpegaudiodecheader.h"
> +#include "libavcodec/mlp_parse.h"
> #include "libavutil/attributes.h"
> #include "libavutil/bprint.h"
> #include "libavutil/channel_layout.h"
> @@ -49,11 +55,6 @@
> #include "libavutil/stereo3d.h"
> #include "libavutil/timecode.h"
> #include "libavutil/uuid.h"
> -#include "libavcodec/ac3tab.h"
> -#include "libavcodec/flac.h"
> -#include "libavcodec/hevc.h"
> -#include "libavcodec/mpegaudiodecheader.h"
> -#include "libavcodec/mlp_parse.h"
> #include "avformat.h"
> #include "internal.h"
> #include "avio_internal.h"
> diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
> index 3b19e0bd89..c4321a9436 100644
> --- a/libavformat/oggdec.c
> +++ b/libavformat/oggdec.c
> @@ -29,6 +29,7 @@
>  */
> 
> #include <stdio.h>
> +#include "libavcodec/defs.h"
> #include "libavutil/avassert.h"
> #include "libavutil/intreadwrite.h"
> #include "avio_internal.h"
> diff --git a/libavformat/riff.c b/libavformat/riff.c
> index 7319406b39..b1cac3171b 100644
> --- a/libavformat/riff.c
> +++ b/libavformat/riff.c
> @@ -22,6 +22,7 @@
> #include <stddef.h>
> #include "config.h"
> #include "config_components.h"
> +#include "libavcodec/codec_id.h"
> #include "libavutil/macros.h"
> #include "avformat.h"
> #include "internal.h"
> -- 
> 2.38.1.windows.1
> 

Please explain why the patch is needed. If chromium rewrite the build system
of FFmpeg, I don’t think FFmpeg should support it.
揚帆起航 Nov. 9, 2022, 2:41 a.m. UTC | #2
I encountered an error in the files included in this patch when compiling
Chromium. When I followed this patch to modify the ffmpeg file in the
Chromium source code, the compilation no longer reported errors.

Chromium regularly merges the latest revisions of ffmpeg through
Cherry-Pick. I also submitted this patch to Chromium before submitting it
to ffmpeg, but Chromium asked me to submit it to ffmpeg first

"zhilizhao(赵志立)" <quinkblack@foxmail.com> 於 2022年11月9日 週三 10:23 寫道:

>
>
> > On Nov 9, 2022, at 03:48, uioptt24@gmail.com wrote:
> >
> > From: gz83 <uioptt24@gmail.com>
> >
> > Cross-compiling Chromium on Ubuntu 22.04 will encounter errors related
> > to avformat, because Chromium regularly synchronizes upstream changes,
> > so now submit code directly to upstream
> > ---
> > libavformat/flac_picture.c |  3 ++-
> > libavformat/matroskadec.c  | 10 +++++-----
> > libavformat/mov.c          | 11 ++++++-----
> > libavformat/oggdec.c       |  1 +
> > libavformat/riff.c         |  1 +
> > 5 files changed, 15 insertions(+), 11 deletions(-)
> >
> > diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
> > index b33fee75b4..36d190fdc7 100644
> > --- a/libavformat/flac_picture.c
> > +++ b/libavformat/flac_picture.c
> > @@ -19,9 +19,10 @@
> >  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301 USA
> >  */
> >
> > -#include "libavutil/intreadwrite.h"
> > #include "libavcodec/bytestream.h"
> > +#include "libavcodec/defs.h"
> > #include "libavcodec/png.h"
> > +#include "libavutil/intreadwrite.h"
> > #include "avformat.h"
> > #include "demux.h"
> > #include "flac_picture.h"
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index d582f566a2..f7bb962941 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -34,6 +34,11 @@
> > #include <inttypes.h>
> > #include <stdio.h>
> >
> > +#include "libavcodec/bytestream.h"
> > +#include "libavcodec/defs.h"
> > +#include "libavcodec/flac.h"
> > +#include "libavcodec/mpeg4audio.h"
> > +#include "libavcodec/packet_internal.h"
> > #include "libavutil/avstring.h"
> > #include "libavutil/base64.h"
> > #include "libavutil/bprint.h"
> > @@ -50,11 +55,6 @@
> > #include "libavutil/time_internal.h"
> > #include "libavutil/spherical.h"
> >
> > -#include "libavcodec/bytestream.h"
> > -#include "libavcodec/flac.h"
> > -#include "libavcodec/mpeg4audio.h"
> > -#include "libavcodec/packet_internal.h"
> > -
> > #include "avformat.h"
> > #include "avio_internal.h"
> > #include "demux.h"
> > diff --git a/libavformat/mov.c b/libavformat/mov.c
> > index 1f436e21d6..39d2c71edb 100644
> > --- a/libavformat/mov.c
> > +++ b/libavformat/mov.c
> > @@ -29,6 +29,12 @@
> > #include <limits.h>
> > #include <stdint.h>
> >
> > +#include "libavcodec/ac3tab.h"
> > +#include "libavcodec/defs.h"
> > +#include "libavcodec/flac.h"
> > +#include "libavcodec/hevc.h"
> > +#include "libavcodec/mpegaudiodecheader.h"
> > +#include "libavcodec/mlp_parse.h"
> > #include "libavutil/attributes.h"
> > #include "libavutil/bprint.h"
> > #include "libavutil/channel_layout.h"
> > @@ -49,11 +55,6 @@
> > #include "libavutil/stereo3d.h"
> > #include "libavutil/timecode.h"
> > #include "libavutil/uuid.h"
> > -#include "libavcodec/ac3tab.h"
> > -#include "libavcodec/flac.h"
> > -#include "libavcodec/hevc.h"
> > -#include "libavcodec/mpegaudiodecheader.h"
> > -#include "libavcodec/mlp_parse.h"
> > #include "avformat.h"
> > #include "internal.h"
> > #include "avio_internal.h"
> > diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
> > index 3b19e0bd89..c4321a9436 100644
> > --- a/libavformat/oggdec.c
> > +++ b/libavformat/oggdec.c
> > @@ -29,6 +29,7 @@
> >  */
> >
> > #include <stdio.h>
> > +#include "libavcodec/defs.h"
> > #include "libavutil/avassert.h"
> > #include "libavutil/intreadwrite.h"
> > #include "avio_internal.h"
> > diff --git a/libavformat/riff.c b/libavformat/riff.c
> > index 7319406b39..b1cac3171b 100644
> > --- a/libavformat/riff.c
> > +++ b/libavformat/riff.c
> > @@ -22,6 +22,7 @@
> > #include <stddef.h>
> > #include "config.h"
> > #include "config_components.h"
> > +#include "libavcodec/codec_id.h"
> > #include "libavutil/macros.h"
> > #include "avformat.h"
> > #include "internal.h"
> > --
> > 2.38.1.windows.1
> >
>
> Please explain why the patch is needed. If chromium rewrite the build
> system
> of FFmpeg, I don’t think FFmpeg should support it.
> _______________________________________________
> 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".
>
zhilizhao(赵志立) Nov. 9, 2022, 2:58 a.m. UTC | #3
> On Nov 9, 2022, at 10:41, 揚帆起航 <uioptt24@gmail.com> wrote:
> 
> I encountered an error in the files included in this patch when compiling
> Chromium. When I followed this patch to modify the ffmpeg file in the
> Chromium source code, the compilation no longer reported errors.
> 
> Chromium regularly merges the latest revisions of ffmpeg through
> Cherry-Pick. I also submitted this patch to Chromium before submitting it
> to ffmpeg, but Chromium asked me to submit it to ffmpeg first

We can’t reproduce the issue, so more details of each ‘undeclared
identifier error’ should be given. For example, why

>>> +#include "libavcodec/defs.h”

is needed in flac_picture.c since it’s already included by avformat.h?

> 
> "zhilizhao(赵志立)" <quinkblack@foxmail.com> 於 2022年11月9日 週三 10:23 寫道:
> 
>> 
>> 
>>> On Nov 9, 2022, at 03:48, uioptt24@gmail.com wrote:
>>> 
>>> From: gz83 <uioptt24@gmail.com>
>>> 
>>> Cross-compiling Chromium on Ubuntu 22.04 will encounter errors related
>>> to avformat, because Chromium regularly synchronizes upstream changes,
>>> so now submit code directly to upstream
>>> ---
>>> libavformat/flac_picture.c |  3 ++-
>>> libavformat/matroskadec.c  | 10 +++++-----
>>> libavformat/mov.c          | 11 ++++++-----
>>> libavformat/oggdec.c       |  1 +
>>> libavformat/riff.c         |  1 +
>>> 5 files changed, 15 insertions(+), 11 deletions(-)
>>> 
>>> diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
>>> index b33fee75b4..36d190fdc7 100644
>>> --- a/libavformat/flac_picture.c
>>> +++ b/libavformat/flac_picture.c
>>> @@ -19,9 +19,10 @@
>>> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>> 02110-1301 USA
>>> */
>>> 
>>> -#include "libavutil/intreadwrite.h"
>>> #include "libavcodec/bytestream.h"
>>> +#include "libavcodec/defs.h"
>>> #include "libavcodec/png.h"
>>> +#include "libavutil/intreadwrite.h"
>>> #include "avformat.h"
>>> #include "demux.h"
>>> #include "flac_picture.h"
>>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>>> index d582f566a2..f7bb962941 100644
>>> --- a/libavformat/matroskadec.c
>>> +++ b/libavformat/matroskadec.c
>>> @@ -34,6 +34,11 @@
>>> #include <inttypes.h>
>>> #include <stdio.h>
>>> 
>>> +#include "libavcodec/bytestream.h"
>>> +#include "libavcodec/defs.h"
>>> +#include "libavcodec/flac.h"
>>> +#include "libavcodec/mpeg4audio.h"
>>> +#include "libavcodec/packet_internal.h"
>>> #include "libavutil/avstring.h"
>>> #include "libavutil/base64.h"
>>> #include "libavutil/bprint.h"
>>> @@ -50,11 +55,6 @@
>>> #include "libavutil/time_internal.h"
>>> #include "libavutil/spherical.h"
>>> 
>>> -#include "libavcodec/bytestream.h"
>>> -#include "libavcodec/flac.h"
>>> -#include "libavcodec/mpeg4audio.h"
>>> -#include "libavcodec/packet_internal.h"
>>> -
>>> #include "avformat.h"
>>> #include "avio_internal.h"
>>> #include "demux.h"
>>> diff --git a/libavformat/mov.c b/libavformat/mov.c
>>> index 1f436e21d6..39d2c71edb 100644
>>> --- a/libavformat/mov.c
>>> +++ b/libavformat/mov.c
>>> @@ -29,6 +29,12 @@
>>> #include <limits.h>
>>> #include <stdint.h>
>>> 
>>> +#include "libavcodec/ac3tab.h"
>>> +#include "libavcodec/defs.h"
>>> +#include "libavcodec/flac.h"
>>> +#include "libavcodec/hevc.h"
>>> +#include "libavcodec/mpegaudiodecheader.h"
>>> +#include "libavcodec/mlp_parse.h"
>>> #include "libavutil/attributes.h"
>>> #include "libavutil/bprint.h"
>>> #include "libavutil/channel_layout.h"
>>> @@ -49,11 +55,6 @@
>>> #include "libavutil/stereo3d.h"
>>> #include "libavutil/timecode.h"
>>> #include "libavutil/uuid.h"
>>> -#include "libavcodec/ac3tab.h"
>>> -#include "libavcodec/flac.h"
>>> -#include "libavcodec/hevc.h"
>>> -#include "libavcodec/mpegaudiodecheader.h"
>>> -#include "libavcodec/mlp_parse.h"
>>> #include "avformat.h"
>>> #include "internal.h"
>>> #include "avio_internal.h"
>>> diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
>>> index 3b19e0bd89..c4321a9436 100644
>>> --- a/libavformat/oggdec.c
>>> +++ b/libavformat/oggdec.c
>>> @@ -29,6 +29,7 @@
>>> */
>>> 
>>> #include <stdio.h>
>>> +#include "libavcodec/defs.h"
>>> #include "libavutil/avassert.h"
>>> #include "libavutil/intreadwrite.h"
>>> #include "avio_internal.h"
>>> diff --git a/libavformat/riff.c b/libavformat/riff.c
>>> index 7319406b39..b1cac3171b 100644
>>> --- a/libavformat/riff.c
>>> +++ b/libavformat/riff.c
>>> @@ -22,6 +22,7 @@
>>> #include <stddef.h>
>>> #include "config.h"
>>> #include "config_components.h"
>>> +#include "libavcodec/codec_id.h"
>>> #include "libavutil/macros.h"
>>> #include "avformat.h"
>>> #include "internal.h"
>>> --
>>> 2.38.1.windows.1
>>> 
>> 
>> Please explain why the patch is needed. If chromium rewrite the build
>> system
>> of FFmpeg, I don’t think FFmpeg should support it.
>> _______________________________________________
>> 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".
>> 
> _______________________________________________
> 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".
揚帆起航 Nov. 9, 2022, 10:37 a.m. UTC | #4
I have reported the errors I encountered during the compilation process in
the Chromium-Dev Group before, and I uploaded the detailed error
information in this post.

https://groups.google.com/a/chromium.org/g/chromium-dev/c/mB7yoDsYtbs

The following is the address where I submitted CL to Chromium before. The
patch submitted in it is the same as the patch I submit to ffmpeg now. I
tested it with the patch I submitted myself and found that the defs.h and
codec_id.h files were introduced. After that, the compilation can proceed
normally.

https://chromium-review.googlesource.com/c/chromium/third_party/ffmpeg/+/4014019

"zhilizhao(赵志立)" <quinkblack@foxmail.com> 於 2022年11月9日週三 上午10:58寫道:

>
>
> > On Nov 9, 2022, at 10:41, 揚帆起航 <uioptt24@gmail.com> wrote:
> >
> > I encountered an error in the files included in this patch when compiling
> > Chromium. When I followed this patch to modify the ffmpeg file in the
> > Chromium source code, the compilation no longer reported errors.
> >
> > Chromium regularly merges the latest revisions of ffmpeg through
> > Cherry-Pick. I also submitted this patch to Chromium before submitting it
> > to ffmpeg, but Chromium asked me to submit it to ffmpeg first
>
> We can’t reproduce the issue, so more details of each ‘undeclared
> identifier error’ should be given. For example, why
>
> >>> +#include "libavcodec/defs.h”
>
> is needed in flac_picture.c since it’s already included by avformat.h?
>
> >
> > "zhilizhao(赵志立)" <quinkblack@foxmail.com> 於 2022年11月9日 週三 10:23 寫道:
> >
> >>
> >>
> >>> On Nov 9, 2022, at 03:48, uioptt24@gmail.com wrote:
> >>>
> >>> From: gz83 <uioptt24@gmail.com>
> >>>
> >>> Cross-compiling Chromium on Ubuntu 22.04 will encounter errors related
> >>> to avformat, because Chromium regularly synchronizes upstream changes,
> >>> so now submit code directly to upstream
> >>> ---
> >>> libavformat/flac_picture.c |  3 ++-
> >>> libavformat/matroskadec.c  | 10 +++++-----
> >>> libavformat/mov.c          | 11 ++++++-----
> >>> libavformat/oggdec.c       |  1 +
> >>> libavformat/riff.c         |  1 +
> >>> 5 files changed, 15 insertions(+), 11 deletions(-)
> >>>
> >>> diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
> >>> index b33fee75b4..36d190fdc7 100644
> >>> --- a/libavformat/flac_picture.c
> >>> +++ b/libavformat/flac_picture.c
> >>> @@ -19,9 +19,10 @@
> >>> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> >> 02110-1301 USA
> >>> */
> >>>
> >>> -#include "libavutil/intreadwrite.h"
> >>> #include "libavcodec/bytestream.h"
> >>> +#include "libavcodec/defs.h"
> >>> #include "libavcodec/png.h"
> >>> +#include "libavutil/intreadwrite.h"
> >>> #include "avformat.h"
> >>> #include "demux.h"
> >>> #include "flac_picture.h"
> >>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> >>> index d582f566a2..f7bb962941 100644
> >>> --- a/libavformat/matroskadec.c
> >>> +++ b/libavformat/matroskadec.c
> >>> @@ -34,6 +34,11 @@
> >>> #include <inttypes.h>
> >>> #include <stdio.h>
> >>>
> >>> +#include "libavcodec/bytestream.h"
> >>> +#include "libavcodec/defs.h"
> >>> +#include "libavcodec/flac.h"
> >>> +#include "libavcodec/mpeg4audio.h"
> >>> +#include "libavcodec/packet_internal.h"
> >>> #include "libavutil/avstring.h"
> >>> #include "libavutil/base64.h"
> >>> #include "libavutil/bprint.h"
> >>> @@ -50,11 +55,6 @@
> >>> #include "libavutil/time_internal.h"
> >>> #include "libavutil/spherical.h"
> >>>
> >>> -#include "libavcodec/bytestream.h"
> >>> -#include "libavcodec/flac.h"
> >>> -#include "libavcodec/mpeg4audio.h"
> >>> -#include "libavcodec/packet_internal.h"
> >>> -
> >>> #include "avformat.h"
> >>> #include "avio_internal.h"
> >>> #include "demux.h"
> >>> diff --git a/libavformat/mov.c b/libavformat/mov.c
> >>> index 1f436e21d6..39d2c71edb 100644
> >>> --- a/libavformat/mov.c
> >>> +++ b/libavformat/mov.c
> >>> @@ -29,6 +29,12 @@
> >>> #include <limits.h>
> >>> #include <stdint.h>
> >>>
> >>> +#include "libavcodec/ac3tab.h"
> >>> +#include "libavcodec/defs.h"
> >>> +#include "libavcodec/flac.h"
> >>> +#include "libavcodec/hevc.h"
> >>> +#include "libavcodec/mpegaudiodecheader.h"
> >>> +#include "libavcodec/mlp_parse.h"
> >>> #include "libavutil/attributes.h"
> >>> #include "libavutil/bprint.h"
> >>> #include "libavutil/channel_layout.h"
> >>> @@ -49,11 +55,6 @@
> >>> #include "libavutil/stereo3d.h"
> >>> #include "libavutil/timecode.h"
> >>> #include "libavutil/uuid.h"
> >>> -#include "libavcodec/ac3tab.h"
> >>> -#include "libavcodec/flac.h"
> >>> -#include "libavcodec/hevc.h"
> >>> -#include "libavcodec/mpegaudiodecheader.h"
> >>> -#include "libavcodec/mlp_parse.h"
> >>> #include "avformat.h"
> >>> #include "internal.h"
> >>> #include "avio_internal.h"
> >>> diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
> >>> index 3b19e0bd89..c4321a9436 100644
> >>> --- a/libavformat/oggdec.c
> >>> +++ b/libavformat/oggdec.c
> >>> @@ -29,6 +29,7 @@
> >>> */
> >>>
> >>> #include <stdio.h>
> >>> +#include "libavcodec/defs.h"
> >>> #include "libavutil/avassert.h"
> >>> #include "libavutil/intreadwrite.h"
> >>> #include "avio_internal.h"
> >>> diff --git a/libavformat/riff.c b/libavformat/riff.c
> >>> index 7319406b39..b1cac3171b 100644
> >>> --- a/libavformat/riff.c
> >>> +++ b/libavformat/riff.c
> >>> @@ -22,6 +22,7 @@
> >>> #include <stddef.h>
> >>> #include "config.h"
> >>> #include "config_components.h"
> >>> +#include "libavcodec/codec_id.h"
> >>> #include "libavutil/macros.h"
> >>> #include "avformat.h"
> >>> #include "internal.h"
> >>> --
> >>> 2.38.1.windows.1
> >>>
> >>
> >> Please explain why the patch is needed. If chromium rewrite the build
> >> system
> >> of FFmpeg, I don’t think FFmpeg should support it.
> >> _______________________________________________
> >> 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".
> >>
> > _______________________________________________
> > 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".
>
> _______________________________________________
> 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".
>
揚帆起航 Nov. 19, 2022, 9:17 a.m. UTC | #5
problem solved

"zhilizhao(赵志立)" <quinkblack@foxmail.com> 於 2022年11月9日週三 上午10:58寫道:

>
>
> > On Nov 9, 2022, at 10:41, 揚帆起航 <uioptt24@gmail.com> wrote:
> >
> > I encountered an error in the files included in this patch when compiling
> > Chromium. When I followed this patch to modify the ffmpeg file in the
> > Chromium source code, the compilation no longer reported errors.
> >
> > Chromium regularly merges the latest revisions of ffmpeg through
> > Cherry-Pick. I also submitted this patch to Chromium before submitting it
> > to ffmpeg, but Chromium asked me to submit it to ffmpeg first
>
> We can’t reproduce the issue, so more details of each ‘undeclared
> identifier error’ should be given. For example, why
>
> >>> +#include "libavcodec/defs.h”
>
> is needed in flac_picture.c since it’s already included by avformat.h?
>
> >
> > "zhilizhao(赵志立)" <quinkblack@foxmail.com> 於 2022年11月9日 週三 10:23 寫道:
> >
> >>
> >>
> >>> On Nov 9, 2022, at 03:48, uioptt24@gmail.com wrote:
> >>>
> >>> From: gz83 <uioptt24@gmail.com>
> >>>
> >>> Cross-compiling Chromium on Ubuntu 22.04 will encounter errors related
> >>> to avformat, because Chromium regularly synchronizes upstream changes,
> >>> so now submit code directly to upstream
> >>> ---
> >>> libavformat/flac_picture.c |  3 ++-
> >>> libavformat/matroskadec.c  | 10 +++++-----
> >>> libavformat/mov.c          | 11 ++++++-----
> >>> libavformat/oggdec.c       |  1 +
> >>> libavformat/riff.c         |  1 +
> >>> 5 files changed, 15 insertions(+), 11 deletions(-)
> >>>
> >>> diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
> >>> index b33fee75b4..36d190fdc7 100644
> >>> --- a/libavformat/flac_picture.c
> >>> +++ b/libavformat/flac_picture.c
> >>> @@ -19,9 +19,10 @@
> >>> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> >> 02110-1301 USA
> >>> */
> >>>
> >>> -#include "libavutil/intreadwrite.h"
> >>> #include "libavcodec/bytestream.h"
> >>> +#include "libavcodec/defs.h"
> >>> #include "libavcodec/png.h"
> >>> +#include "libavutil/intreadwrite.h"
> >>> #include "avformat.h"
> >>> #include "demux.h"
> >>> #include "flac_picture.h"
> >>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> >>> index d582f566a2..f7bb962941 100644
> >>> --- a/libavformat/matroskadec.c
> >>> +++ b/libavformat/matroskadec.c
> >>> @@ -34,6 +34,11 @@
> >>> #include <inttypes.h>
> >>> #include <stdio.h>
> >>>
> >>> +#include "libavcodec/bytestream.h"
> >>> +#include "libavcodec/defs.h"
> >>> +#include "libavcodec/flac.h"
> >>> +#include "libavcodec/mpeg4audio.h"
> >>> +#include "libavcodec/packet_internal.h"
> >>> #include "libavutil/avstring.h"
> >>> #include "libavutil/base64.h"
> >>> #include "libavutil/bprint.h"
> >>> @@ -50,11 +55,6 @@
> >>> #include "libavutil/time_internal.h"
> >>> #include "libavutil/spherical.h"
> >>>
> >>> -#include "libavcodec/bytestream.h"
> >>> -#include "libavcodec/flac.h"
> >>> -#include "libavcodec/mpeg4audio.h"
> >>> -#include "libavcodec/packet_internal.h"
> >>> -
> >>> #include "avformat.h"
> >>> #include "avio_internal.h"
> >>> #include "demux.h"
> >>> diff --git a/libavformat/mov.c b/libavformat/mov.c
> >>> index 1f436e21d6..39d2c71edb 100644
> >>> --- a/libavformat/mov.c
> >>> +++ b/libavformat/mov.c
> >>> @@ -29,6 +29,12 @@
> >>> #include <limits.h>
> >>> #include <stdint.h>
> >>>
> >>> +#include "libavcodec/ac3tab.h"
> >>> +#include "libavcodec/defs.h"
> >>> +#include "libavcodec/flac.h"
> >>> +#include "libavcodec/hevc.h"
> >>> +#include "libavcodec/mpegaudiodecheader.h"
> >>> +#include "libavcodec/mlp_parse.h"
> >>> #include "libavutil/attributes.h"
> >>> #include "libavutil/bprint.h"
> >>> #include "libavutil/channel_layout.h"
> >>> @@ -49,11 +55,6 @@
> >>> #include "libavutil/stereo3d.h"
> >>> #include "libavutil/timecode.h"
> >>> #include "libavutil/uuid.h"
> >>> -#include "libavcodec/ac3tab.h"
> >>> -#include "libavcodec/flac.h"
> >>> -#include "libavcodec/hevc.h"
> >>> -#include "libavcodec/mpegaudiodecheader.h"
> >>> -#include "libavcodec/mlp_parse.h"
> >>> #include "avformat.h"
> >>> #include "internal.h"
> >>> #include "avio_internal.h"
> >>> diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
> >>> index 3b19e0bd89..c4321a9436 100644
> >>> --- a/libavformat/oggdec.c
> >>> +++ b/libavformat/oggdec.c
> >>> @@ -29,6 +29,7 @@
> >>> */
> >>>
> >>> #include <stdio.h>
> >>> +#include "libavcodec/defs.h"
> >>> #include "libavutil/avassert.h"
> >>> #include "libavutil/intreadwrite.h"
> >>> #include "avio_internal.h"
> >>> diff --git a/libavformat/riff.c b/libavformat/riff.c
> >>> index 7319406b39..b1cac3171b 100644
> >>> --- a/libavformat/riff.c
> >>> +++ b/libavformat/riff.c
> >>> @@ -22,6 +22,7 @@
> >>> #include <stddef.h>
> >>> #include "config.h"
> >>> #include "config_components.h"
> >>> +#include "libavcodec/codec_id.h"
> >>> #include "libavutil/macros.h"
> >>> #include "avformat.h"
> >>> #include "internal.h"
> >>> --
> >>> 2.38.1.windows.1
> >>>
> >>
> >> Please explain why the patch is needed. If chromium rewrite the build
> >> system
> >> of FFmpeg, I don’t think FFmpeg should support it.
> >> _______________________________________________
> >> 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".
> >>
> > _______________________________________________
> > 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".
>
> _______________________________________________
> 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/flac_picture.c b/libavformat/flac_picture.c
index b33fee75b4..36d190fdc7 100644
--- a/libavformat/flac_picture.c
+++ b/libavformat/flac_picture.c
@@ -19,9 +19,10 @@ 
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "libavutil/intreadwrite.h"
 #include "libavcodec/bytestream.h"
+#include "libavcodec/defs.h"
 #include "libavcodec/png.h"
+#include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "demux.h"
 #include "flac_picture.h"
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index d582f566a2..f7bb962941 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -34,6 +34,11 @@ 
 #include <inttypes.h>
 #include <stdio.h>
 
+#include "libavcodec/bytestream.h"
+#include "libavcodec/defs.h"
+#include "libavcodec/flac.h"
+#include "libavcodec/mpeg4audio.h"
+#include "libavcodec/packet_internal.h"
 #include "libavutil/avstring.h"
 #include "libavutil/base64.h"
 #include "libavutil/bprint.h"
@@ -50,11 +55,6 @@ 
 #include "libavutil/time_internal.h"
 #include "libavutil/spherical.h"
 
-#include "libavcodec/bytestream.h"
-#include "libavcodec/flac.h"
-#include "libavcodec/mpeg4audio.h"
-#include "libavcodec/packet_internal.h"
-
 #include "avformat.h"
 #include "avio_internal.h"
 #include "demux.h"
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1f436e21d6..39d2c71edb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -29,6 +29,12 @@ 
 #include <limits.h>
 #include <stdint.h>
 
+#include "libavcodec/ac3tab.h"
+#include "libavcodec/defs.h"
+#include "libavcodec/flac.h"
+#include "libavcodec/hevc.h"
+#include "libavcodec/mpegaudiodecheader.h"
+#include "libavcodec/mlp_parse.h"
 #include "libavutil/attributes.h"
 #include "libavutil/bprint.h"
 #include "libavutil/channel_layout.h"
@@ -49,11 +55,6 @@ 
 #include "libavutil/stereo3d.h"
 #include "libavutil/timecode.h"
 #include "libavutil/uuid.h"
-#include "libavcodec/ac3tab.h"
-#include "libavcodec/flac.h"
-#include "libavcodec/hevc.h"
-#include "libavcodec/mpegaudiodecheader.h"
-#include "libavcodec/mlp_parse.h"
 #include "avformat.h"
 #include "internal.h"
 #include "avio_internal.h"
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 3b19e0bd89..c4321a9436 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -29,6 +29,7 @@ 
  */
 
 #include <stdio.h>
+#include "libavcodec/defs.h"
 #include "libavutil/avassert.h"
 #include "libavutil/intreadwrite.h"
 #include "avio_internal.h"
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 7319406b39..b1cac3171b 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -22,6 +22,7 @@ 
 #include <stddef.h>
 #include "config.h"
 #include "config_components.h"
+#include "libavcodec/codec_id.h"
 #include "libavutil/macros.h"
 #include "avformat.h"
 #include "internal.h"