~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/truemotion2.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
            len = AV_RB32(buf); buf += 4; cur += 4;
273
273
        }
274
274
        if(len > 0) {
 
275
            if (skip <= cur)
 
276
                return -1;
275
277
            init_get_bits(&ctx->gb, buf, (skip - cur) * 8);
276
278
            if(tm2_read_deltas(ctx, stream_id) == -1)
277
279
                return -1;
286
288
    buf += 4; cur += 4;
287
289
    buf += 4; cur += 4; /* unused by decoder */
288
290
 
 
291
    if (skip <= cur)
 
292
        return -1;
289
293
    init_get_bits(&ctx->gb, buf, (skip - cur) * 8);
290
294
    if(tm2_build_huff_table(ctx, &codes) == -1)
291
295
        return -1;
303
307
    ctx->tok_lens[stream_id] = toks;
304
308
    len = AV_RB32(buf); buf += 4; cur += 4;
305
309
    if(len > 0) {
 
310
        if (skip <= cur)
 
311
            return -1;
306
312
        init_get_bits(&ctx->gb, buf, (skip - cur) * 8);
307
313
        for(i = 0; i < toks; i++) {
308
314
            if (get_bits_left(&ctx->gb) <= 0) {
864
870
}
865
871
 
866
872
AVCodec ff_truemotion2_decoder = {
867
 
    "truemotion2",
868
 
    AVMEDIA_TYPE_VIDEO,
869
 
    CODEC_ID_TRUEMOTION2,
870
 
    sizeof(TM2Context),
871
 
    decode_init,
872
 
    NULL,
873
 
    decode_end,
874
 
    decode_frame,
875
 
    CODEC_CAP_DR1,
 
873
    .name           = "truemotion2",
 
874
    .type           = AVMEDIA_TYPE_VIDEO,
 
875
    .id             = CODEC_ID_TRUEMOTION2,
 
876
    .priv_data_size = sizeof(TM2Context),
 
877
    .init           = decode_init,
 
878
    .close          = decode_end,
 
879
    .decode         = decode_frame,
 
880
    .capabilities   = CODEC_CAP_DR1,
876
881
    .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0"),
877
882
};