~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/gif.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Andrew Starr-Bochicchio, Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081226001006-2040ls9680bd1blt
Tags: 1.1.7-0.2ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian-multimedia (LP: #298547), Ubuntu Changes:
 - For ffmpeg-related build-deps, fix versionized dependencies
   as the ubuntu versioning is different than debian-multimedia's.

[ Lionel Le Folgoc ]
* LP: #311412 is fixed since the 1.1.7~rc1-0.1 revision.
* debian/patches/03_ffmpeg.diff: updated to fix FTBFS due to libswscale API
  change (cherry-pick from Gentoo #234383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        //printf("bitbuf = %08x\n", bit_buf);
138
138
        s->buf_ptr+=4;
139
139
        if (s->buf_ptr >= s->buf_end)
140
 
            puts("bit buffer overflow !!"); // should never happen ! who got rid of the callback ???
 
140
            abort();
141
141
//            flush_buffer_rev(s);
142
142
        bit_cnt=bit_cnt + n - 32;
143
143
        if (bit_cnt == 0) {
313
313
static int gif_write_header(AVFormatContext *s)
314
314
{
315
315
    GIFContext *gif = s->priv_data;
316
 
    ByteIOContext *pb = &s->pb;
 
316
    ByteIOContext *pb = s->pb;
317
317
    AVCodecContext *enc, *video_enc;
318
318
    int i, width, height, loop_count /*, rate*/;
319
319
 
343
343
 
344
344
    if (video_enc->pix_fmt != PIX_FMT_RGB24) {
345
345
        av_log(s, AV_LOG_ERROR, "ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.\n");
346
 
        return AVERROR_IO;
 
346
        return AVERROR(EIO);
347
347
    }
348
348
 
349
349
    gif_image_write_header(pb, width, height, loop_count, NULL);
350
350
 
351
 
    put_flush_packet(&s->pb);
 
351
    put_flush_packet(s->pb);
352
352
    return 0;
353
353
}
354
354
 
355
355
static int gif_write_video(AVFormatContext *s,
356
356
                           AVCodecContext *enc, const uint8_t *buf, int size)
357
357
{
358
 
    ByteIOContext *pb = &s->pb;
 
358
    ByteIOContext *pb = s->pb;
359
359
    GIFContext *gif = s->priv_data;
360
360
    int jiffies;
361
361
    int64_t delay;
383
383
    gif_image_write_image(pb, 0, 0, enc->width, enc->height,
384
384
                          buf, enc->width * 3, PIX_FMT_RGB24);
385
385
 
386
 
    put_flush_packet(&s->pb);
 
386
    put_flush_packet(s->pb);
387
387
    return 0;
388
388
}
389
389
 
398
398
 
399
399
static int gif_write_trailer(AVFormatContext *s)
400
400
{
401
 
    ByteIOContext *pb = &s->pb;
 
401
    ByteIOContext *pb = s->pb;
402
402
 
403
403
    put_byte(pb, 0x3b);
404
 
    put_flush_packet(&s->pb);
 
404
    put_flush_packet(s->pb);
405
405
    return 0;
406
406
}
407
407