Commit 9db1c645 authored by Clément Bœsch's avatar Clément Bœsch

lavf/gif: support only GIF codec.

parent 01367b0f
...@@ -77,10 +77,11 @@ static int gif_write_header(AVFormatContext *s) ...@@ -77,10 +77,11 @@ static int gif_write_header(AVFormatContext *s)
int width, height; int width, height;
uint32_t palette[AVPALETTE_COUNT]; uint32_t palette[AVPALETTE_COUNT];
if (s->nb_streams != 1 || !s->streams[0]->codec || if (s->nb_streams != 1 ||
s->streams[0]->codec->codec_type != AVMEDIA_TYPE_VIDEO) { s->streams[0]->codec->codec_type != AVMEDIA_TYPE_VIDEO ||
s->streams[0]->codec->codec_id != AV_CODEC_ID_GIF) {
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
"GIF supports only a single video stream.\n"); "GIF muxer supports only a single video GIF stream.\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment