<div dir="ltr">Hello,<div><br></div><div>I want to fill two combo boxes in a GTK+3 program with the container and its relevant codecs. I have this code:</div><div><br></div><div>#include <stdlib.h><br>#include <string.h><br>#include <libavcodec/avcodec.h><br>#include <libavutil/opt.h><br>#include <libavformat/avformat.h><br><br>int main(int argc, char **argv)<br>{<br>  avcodec_register_all();<br>       av_register_all();<br><br>  AVCodec *encoder = NULL;<br>      struct AVCodecTag **avctag;<br>   AVOutputFormat *outputFormat = NULL;<br>  <br>      const char *file = "file.mp4";<br>      outputFormat = av_guess_format(0, file, 0);<br>   <br>      if( ! outputFormat)<br>   {<br>             printf ("No container found\n");<br>            exit (1);<br>     }<br>     printf("%s %d\n",outputFormat->long_name,outputFormat->video_codec);<br>  <br>      avctag = outputFormat->codec_tag;<br>  printf("%d\n", (outputFormat->codec_tag[0])->id);<br>}<br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>gcc gives this output:</div><div>enum_codec.c:60:9: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]<br>  avctag = outputFormat->codec_tag;<br>         ^<br>enum_codec.c:61:45: error: dereferencing pointer to incomplete type ‘const struct AVCodecTag’<br>  printf("%d\n", (outputFormat->codec_tag[0])->id);<br></div><div><br></div><div>Even adding this in the code it doesn't make any change:</div><div><br></div><div>struct AVCodecTag<br>      {<br>             enum AVCodecID  id;<br>           unsigned int    tag;<br>  };<br></div><div><br></div><div>Can someone explain how to access id and tag inside AVCodecTag?</div><div><br></div><div>Many thanks</div><div>GiuTor</div><div dir="ltr">--</div><div dir="ltr"><div>Youtube: <a href="http://www.youtube.com/giutor73" target="_blank">www.youtube.com/giutor73</a><br></div><div>Instagram: the.italian.dude</div></div></div></div></div></div></div></div></div></div>