~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/mjpegbdec.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:
81
81
    {
82
82
        init_get_bits(&s->gb, buf_ptr+dqt_offs, (buf_end - (buf_ptr+dqt_offs))*8);
83
83
        s->start_code = DQT;
84
 
        ff_mjpeg_decode_dqt(s);
 
84
        if (ff_mjpeg_decode_dqt(s) < 0 &&
 
85
            (avctx->err_recognition & AV_EF_EXPLODE))
 
86
          return AVERROR_INVALIDDATA;
85
87
    }
86
88
 
87
89
    dht_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "dht is %d and size is %d\n");
113
115
        init_get_bits(&s->gb, buf_ptr+sos_offs, field_size*8);
114
116
        s->mjpb_skiptosod = (sod_offs - sos_offs - show_bits(&s->gb, 16));
115
117
        s->start_code = SOS;
116
 
        ff_mjpeg_decode_sos(s, NULL, NULL);
 
118
        if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
 
119
            (avctx->err_recognition & AV_EF_EXPLODE))
 
120
          return AVERROR_INVALIDDATA;
117
121
    }
118
122
 
119
123
    if (s->interlaced) {
146
150
}
147
151
 
148
152
AVCodec ff_mjpegb_decoder = {
149
 
    "mjpegb",
150
 
    AVMEDIA_TYPE_VIDEO,
151
 
    CODEC_ID_MJPEGB,
152
 
    sizeof(MJpegDecodeContext),
153
 
    ff_mjpeg_decode_init,
154
 
    NULL,
155
 
    ff_mjpeg_decode_end,
156
 
    mjpegb_decode_frame,
157
 
    CODEC_CAP_DR1,
158
 
    NULL,
 
153
    .name           = "mjpegb",
 
154
    .type           = AVMEDIA_TYPE_VIDEO,
 
155
    .id             = CODEC_ID_MJPEGB,
 
156
    .priv_data_size = sizeof(MJpegDecodeContext),
 
157
    .init           = ff_mjpeg_decode_init,
 
158
    .close          = ff_mjpeg_decode_end,
 
159
    .decode         = mjpegb_decode_frame,
 
160
    .capabilities   = CODEC_CAP_DR1,
159
161
    .max_lowres = 3,
160
162
    .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
161
163
};