[Libav-user] gif extension isn't guessed with image2pipe

kragen mail654 at gmx.de
Thu Mar 6 15:45:37 CET 2014


Hi,

A gif file isn't guessed any more after gif was removed from img_tags[] in
img2.c.

Below there is a sample which results in "codec_name=, codec_id=0" for a gif
file. Other codecs listed in img_tags[] are detected correctly.

Is this behaviour intended?
I need to use image2pipe, because I need a custom AVIOContext.

regards

#include <stdio.h>
#include <libavformat/avformat.h>

int main (int argc, char **argv)
{
  av_register_all();
  AVFormatContext *avFormat = avformat_alloc_context();
  AVInputFormat *fmt = av_find_input_format("image2pipe");

  avformat_open_input(&avFormat, "test.gif", fmt, NULL);
  printf("codec_name=%s, codec_id=%i\n",
avFormat->streams[0]->codec->codec_name, avFormat->streams[0]->codec->codec_id);
  return 0;
}



More information about the Libav-user mailing list