~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to libavcodec/vp3.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
2321
2321
    return vp3_decode_init(avctx);
2322
2322
}
2323
2323
 
 
2324
static void vp3_decode_flush(AVCodecContext *avctx)
 
2325
{
 
2326
    Vp3DecodeContext *s = avctx->priv_data;
 
2327
 
 
2328
    if (s->golden_frame.data[0]) {
 
2329
        if (s->golden_frame.data[0] == s->last_frame.data[0])
 
2330
            memset(&s->last_frame, 0, sizeof(AVFrame));
 
2331
        if (s->current_frame.data[0] == s->golden_frame.data[0])
 
2332
            memset(&s->current_frame, 0, sizeof(AVFrame));
 
2333
        ff_thread_release_buffer(avctx, &s->golden_frame);
 
2334
    }
 
2335
    if (s->last_frame.data[0]) {
 
2336
        if (s->current_frame.data[0] == s->last_frame.data[0])
 
2337
            memset(&s->current_frame, 0, sizeof(AVFrame));
 
2338
        ff_thread_release_buffer(avctx, &s->last_frame);
 
2339
    }
 
2340
    if (s->current_frame.data[0])
 
2341
        ff_thread_release_buffer(avctx, &s->current_frame);
 
2342
}
 
2343
 
2324
2344
AVCodec ff_theora_decoder = {
2325
2345
    "theora",
2326
2346
    AVMEDIA_TYPE_VIDEO,
2332
2352
    vp3_decode_frame,
2333
2353
    CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
2334
2354
    NULL,
 
2355
    .flush = vp3_decode_flush,
2335
2356
    .long_name = NULL_IF_CONFIG_SMALL("Theora"),
2336
2357
    .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
2337
2358
};
2348
2369
    vp3_decode_frame,
2349
2370
    CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
2350
2371
    NULL,
 
2372
    .flush = vp3_decode_flush,
2351
2373
    .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
2352
2374
    .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
2353
2375
};