Opened 7 months ago

Closed 7 months ago

#10624 closed defect (invalid)

the example decode_audio.c does not compile

Reported by: rabijl Owned by:
Priority: minor Component: undetermined
Version: unspecified Keywords: examples docs
Cc: rabijl Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I tried to compile the examples in doc/examples, however the decode_audio.c errors when compiling. This is the error generated:

```
cc  -Wall -g   -c -o decode_audio.o decode_audio.c
decode_audio.c: In function ‘decode’:
decode_audio.c:101:54: error: request for member ‘nb_channels’ in something not a structure or union
  101 |             for (ch = 0; ch < dec_ctx->channel_layout.nb_channels; ch++)
      |                                                      ^
decode_audio.c: In function ‘main’:
decode_audio.c:219:35: error: request for member ‘nb_channels’ in something not a structure or union
  219 |     n_channels = c->channel_layout.nb_channels;
      |                                   ^
make: *** [<builtin>: decode_audio.o] Error 1

``` 
I tried this on both ubuntu and arch and got the same result

How to reproduce:

% run `make -f Makefile.example` in the master branch of ffmpeg 
ffmpeg version: 4.4.2-0ubuntu0.22.04.1
built on: ubuntu 22.04 lts
cc version:(Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (2)

comment:1 by rabijl, 7 months ago

I Figured out that I forgot to checkout the correct tag. feel free to delete this ticket

comment:2 by Balling, 7 months ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.