Mercurial > libavformat.hg
comparison gif.c @ 1220:ea469913fb68 libavformat
Do not set the codec's pixel format in the format's write_header()
author | lucabe |
---|---|
date | Wed, 02 Aug 2006 09:48:05 +0000 |
parents | d18cc9a1fd02 |
children | 0899bfe4105c |
comparison
equal
deleted
inserted
replaced
1219:462a4f4e148c | 1220:ea469913fb68 |
---|---|
337 height = video_enc->height; | 337 height = video_enc->height; |
338 loop_count = s->loop_output; | 338 loop_count = s->loop_output; |
339 // rate = video_enc->time_base.den; | 339 // rate = video_enc->time_base.den; |
340 } | 340 } |
341 | 341 |
342 /* XXX: is it allowed ? seems to work so far... */ | 342 if (video_enc->pix_fmt != PIX_FMT_RGB24) { |
343 video_enc->pix_fmt = PIX_FMT_RGB24; | 343 av_log(s, AV_LOG_ERROR, "ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.\n"); |
344 return AVERROR_IO; | |
345 } | |
344 | 346 |
345 gif_image_write_header(pb, width, height, loop_count, NULL); | 347 gif_image_write_header(pb, width, height, loop_count, NULL); |
346 | 348 |
347 put_flush_packet(&s->pb); | 349 put_flush_packet(&s->pb); |
348 return 0; | 350 return 0; |