~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/vmdav.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
#define QUEUE_SIZE 0x1000
73
73
#define QUEUE_MASK 0x0FFF
74
74
 
75
 
static void lz_unpack(const unsigned char *src, unsigned char *dest, int dest_len)
 
75
static void lz_unpack(const unsigned char *src, int src_len,
 
76
                      unsigned char *dest, int dest_len)
76
77
{
77
78
    const unsigned char *s;
 
79
    unsigned int s_len;
78
80
    unsigned char *d;
79
81
    unsigned char *d_end;
80
82
    unsigned char queue[QUEUE_SIZE];
87
89
    unsigned int i, j;
88
90
 
89
91
    s = src;
 
92
    s_len = src_len;
90
93
    d = dest;
91
94
    d_end = d + dest_len;
92
95
    dataleft = AV_RL32(s);
93
 
    s += 4;
 
96
    s += 4; s_len -= 4;
94
97
    memset(queue, 0x20, QUEUE_SIZE);
 
98
    if (s_len < 4)
 
99
        return;
95
100
    if (AV_RL32(s) == 0x56781234) {
96
 
        s += 4;
 
101
        s += 4; s_len -= 4;
97
102
        qpos = 0x111;
98
103
        speclen = 0xF + 3;
99
104
    } else {
101
106
        speclen = 100;  /* no speclen */
102
107
    }
103
108
 
104
 
    while (dataleft > 0) {
105
 
        tag = *s++;
 
109
    while (dataleft > 0 && s_len > 0) {
 
110
        tag = *s++; s_len--;
106
111
        if ((tag == 0xFF) && (dataleft > 8)) {
107
 
            if (d + 8 > d_end)
 
112
            if (d + 8 > d_end || s_len < 8)
108
113
                return;
109
114
            for (i = 0; i < 8; i++) {
110
115
                queue[qpos++] = *d++ = *s++;
111
116
                qpos &= QUEUE_MASK;
112
117
            }
 
118
            s_len -= 8;
113
119
            dataleft -= 8;
114
120
        } else {
115
121
            for (i = 0; i < 8; i++) {
116
122
                if (dataleft == 0)
117
123
                    break;
118
124
                if (tag & 0x01) {
119
 
                    if (d + 1 > d_end)
 
125
                    if (d + 1 > d_end || s_len < 1)
120
126
                        return;
121
127
                    queue[qpos++] = *d++ = *s++;
122
128
                    qpos &= QUEUE_MASK;
123
129
                    dataleft--;
 
130
                    s_len--;
124
131
                } else {
 
132
                    if (s_len < 2)
 
133
                        return;
125
134
                    chainofs = *s++;
126
135
                    chainofs |= ((*s & 0xF0) << 4);
127
136
                    chainlen = (*s++ & 0x0F) + 3;
128
 
                    if (chainlen == speclen)
 
137
                    s_len -= 2;
 
138
                    if (chainlen == speclen) {
 
139
                        if (s_len < 1)
 
140
                            return;
129
141
                        chainlen = *s++ + 0xF + 3;
 
142
                        s_len--;
 
143
                    }
130
144
                    if (d + chainlen > d_end)
131
145
                        return;
132
146
                    for (j = 0; j < chainlen; j++) {
143
157
}
144
158
 
145
159
static int rle_unpack(const unsigned char *src, unsigned char *dest,
146
 
    int src_len, int dest_len)
 
160
    int src_count, int src_size, int dest_len)
147
161
{
148
162
    const unsigned char *ps;
149
163
    unsigned char *pd;
152
166
 
153
167
    ps = src;
154
168
    pd = dest;
155
 
    if (src_len & 1)
 
169
    if (src_count & 1) {
 
170
        if (src_size < 1)
 
171
            return 0;
156
172
        *pd++ = *ps++;
 
173
        src_size--;
 
174
    }
157
175
 
158
 
    src_len >>= 1;
 
176
    src_count >>= 1;
159
177
    i = 0;
160
178
    do {
 
179
        if (src_size < 1)
 
180
            break;
161
181
        l = *ps++;
 
182
        src_size--;
162
183
        if (l & 0x80) {
163
184
            l = (l & 0x7F) * 2;
164
 
            if (pd + l > dest_end)
 
185
            if (pd + l > dest_end || src_size < l)
165
186
                return ps - src;
166
187
            memcpy(pd, ps, l);
167
188
            ps += l;
 
189
            src_size -= l;
168
190
            pd += l;
169
191
        } else {
170
 
            if (pd + i > dest_end)
 
192
            if (pd + i > dest_end || src_size < 2)
171
193
                return ps - src;
172
194
            for (i = 0; i < l; i++) {
173
195
                *pd++ = ps[0];
174
196
                *pd++ = ps[1];
175
197
            }
176
198
            ps += 2;
 
199
            src_size -= 2;
177
200
        }
178
201
        i += l;
179
 
    } while (i < src_len);
 
202
    } while (i < src_count);
180
203
 
181
204
    return ps - src;
182
205
}
191
214
    const unsigned char *p = s->buf + 16;
192
215
 
193
216
    const unsigned char *pb;
 
217
    unsigned int pb_size;
194
218
    unsigned char meth;
195
219
    unsigned char *dp;   /* pointer to current frame */
196
220
    unsigned char *pp;   /* pointer to previous frame */
204
228
    frame_y = AV_RL16(&s->buf[8]);
205
229
    frame_width = AV_RL16(&s->buf[10]) - frame_x + 1;
206
230
    frame_height = AV_RL16(&s->buf[12]) - frame_y + 1;
 
231
    if (frame_x < 0 || frame_width < 0 ||
 
232
        frame_x >= s->avctx->width ||
 
233
        frame_width > s->avctx->width ||
 
234
        frame_x + frame_width > s->avctx->width)
 
235
        return;
 
236
    if (frame_y < 0 || frame_height < 0 ||
 
237
        frame_y >= s->avctx->height ||
 
238
        frame_height > s->avctx->height ||
 
239
        frame_y + frame_height > s->avctx->height)
 
240
        return;
207
241
 
208
242
    if ((frame_width == s->avctx->width && frame_height == s->avctx->height) &&
209
243
        (frame_x || frame_y)) {
216
250
 
217
251
    /* if only a certain region will be updated, copy the entire previous
218
252
     * frame before the decode */
219
 
    if (frame_x || frame_y || (frame_width != s->avctx->width) ||
220
 
        (frame_height != s->avctx->height)) {
 
253
    if (s->prev_frame.data[0] &&
 
254
        (frame_x || frame_y || (frame_width != s->avctx->width) ||
 
255
        (frame_height != s->avctx->height))) {
221
256
 
222
257
        memcpy(s->frame.data[0], s->prev_frame.data[0],
223
258
            s->avctx->height * s->frame.linesize[0]);
235
270
        }
236
271
        s->size -= (256 * 3 + 2);
237
272
    }
238
 
    if (s->size >= 0) {
 
273
    if (s->size > 0) {
239
274
        /* originally UnpackFrame in VAG's code */
240
275
        pb = p;
241
 
        meth = *pb++;
 
276
        pb_size = s->buf + s->size - pb;
 
277
        if (pb_size < 1)
 
278
            return;
 
279
        meth = *pb++; pb_size--;
242
280
        if (meth & 0x80) {
243
 
            lz_unpack(pb, s->unpack_buffer, s->unpack_buffer_size);
 
281
            lz_unpack(pb, pb_size,
 
282
                      s->unpack_buffer, s->unpack_buffer_size);
244
283
            meth &= 0x7F;
245
284
            pb = s->unpack_buffer;
 
285
            pb_size = s->unpack_buffer_size;
246
286
        }
247
287
 
248
288
        dp = &s->frame.data[0][frame_y * s->frame.linesize[0] + frame_x];
252
292
            for (i = 0; i < frame_height; i++) {
253
293
                ofs = 0;
254
294
                do {
 
295
                    if (pb_size < 1)
 
296
                        return;
255
297
                    len = *pb++;
 
298
                    pb_size--;
256
299
                    if (len & 0x80) {
257
300
                        len = (len & 0x7F) + 1;
258
 
                        if (ofs + len > frame_width)
 
301
                        if (ofs + len > frame_width || pb_size < len)
259
302
                            return;
260
303
                        memcpy(&dp[ofs], pb, len);
261
304
                        pb += len;
 
305
                        pb_size -= len;
262
306
                        ofs += len;
263
307
                    } else {
264
308
                        /* interframe pixel copy */
265
 
                        if (ofs + len + 1 > frame_width)
 
309
                        if (ofs + len + 1 > frame_width || !s->prev_frame.data[0])
266
310
                            return;
267
311
                        memcpy(&dp[ofs], &pp[ofs], len + 1);
268
312
                        ofs += len + 1;
280
324
 
281
325
        case 2:
282
326
            for (i = 0; i < frame_height; i++) {
 
327
                if (pb_size < frame_width)
 
328
                    return;
283
329
                memcpy(dp, pb, frame_width);
284
330
                pb += frame_width;
 
331
                pb_size -= frame_width;
285
332
                dp += s->frame.linesize[0];
286
333
                pp += s->prev_frame.linesize[0];
287
334
            }
291
338
            for (i = 0; i < frame_height; i++) {
292
339
                ofs = 0;
293
340
                do {
 
341
                    if (pb_size < 1)
 
342
                        return;
294
343
                    len = *pb++;
 
344
                    pb_size--;
295
345
                    if (len & 0x80) {
296
346
                        len = (len & 0x7F) + 1;
 
347
                        if (pb_size < 1)
 
348
                            return;
297
349
                        if (*pb++ == 0xFF)
298
 
                            len = rle_unpack(pb, &dp[ofs], len, frame_width - ofs);
299
 
                        else
 
350
                            len = rle_unpack(pb, &dp[ofs], len, pb_size, frame_width - ofs);
 
351
                        else {
 
352
                            if (pb_size < len)
 
353
                                return;
300
354
                            memcpy(&dp[ofs], pb, len);
 
355
                        }
301
356
                        pb += len;
 
357
                        pb_size -= 1 + len;
302
358
                        ofs += len;
303
359
                    } else {
304
360
                        /* interframe pixel copy */
305
 
                        if (ofs + len + 1 > frame_width)
 
361
                        if (ofs + len + 1 > frame_width || !s->prev_frame.data[0])
306
362
                            return;
307
363
                        memcpy(&dp[ofs], &pp[ofs], len + 1);
308
364
                        ofs += len + 1;
417
473
#define BLOCK_TYPE_SILENCE  3
418
474
 
419
475
typedef struct VmdAudioContext {
420
 
    AVCodecContext *avctx;
 
476
    AVFrame frame;
421
477
    int out_bps;
422
 
    int predictors[2];
 
478
    int chunk_size;
423
479
} VmdAudioContext;
424
480
 
425
481
static const uint16_t vmdaudio_table[128] = {
442
498
{
443
499
    VmdAudioContext *s = avctx->priv_data;
444
500
 
445
 
    s->avctx = avctx;
 
501
    if (avctx->channels < 1 || avctx->channels > 2) {
 
502
        av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
 
503
        return AVERROR(EINVAL);
 
504
    }
 
505
    if (avctx->block_align < 1) {
 
506
        av_log(avctx, AV_LOG_ERROR, "invalid block align\n");
 
507
        return AVERROR(EINVAL);
 
508
    }
 
509
 
446
510
    if (avctx->bits_per_coded_sample == 16)
447
511
        avctx->sample_fmt = AV_SAMPLE_FMT_S16;
448
512
    else
449
513
        avctx->sample_fmt = AV_SAMPLE_FMT_U8;
450
514
    s->out_bps = av_get_bytes_per_sample(avctx->sample_fmt);
451
515
 
 
516
    s->chunk_size = avctx->block_align + avctx->channels * (s->out_bps == 2);
 
517
 
 
518
    avcodec_get_frame_defaults(&s->frame);
 
519
    avctx->coded_frame = &s->frame;
 
520
 
452
521
    av_log(avctx, AV_LOG_DEBUG, "%d channels, %d bits/sample, "
453
522
           "block align = %d, sample rate = %d\n",
454
523
           avctx->channels, avctx->bits_per_coded_sample, avctx->block_align,
457
526
    return 0;
458
527
}
459
528
 
460
 
static void vmdaudio_decode_audio(VmdAudioContext *s, unsigned char *data,
461
 
    const uint8_t *buf, int buf_size, int stereo)
 
529
static void decode_audio_s16(int16_t *out, const uint8_t *buf, int buf_size,
 
530
                             int channels)
462
531
{
463
 
    int i;
464
 
    int chan = 0;
465
 
    int16_t *out = (int16_t*)data;
466
 
 
467
 
    for(i = 0; i < buf_size; i++) {
468
 
        if(buf[i] & 0x80)
469
 
            s->predictors[chan] -= vmdaudio_table[buf[i] & 0x7F];
 
532
    int ch;
 
533
    const uint8_t *buf_end = buf + buf_size;
 
534
    int predictor[2];
 
535
    int st = channels - 1;
 
536
 
 
537
    /* decode initial raw sample */
 
538
    for (ch = 0; ch < channels; ch++) {
 
539
        predictor[ch] = (int16_t)AV_RL16(buf);
 
540
        buf += 2;
 
541
        *out++ = predictor[ch];
 
542
    }
 
543
 
 
544
    /* decode DPCM samples */
 
545
    ch = 0;
 
546
    while (buf < buf_end) {
 
547
        uint8_t b = *buf++;
 
548
        if (b & 0x80)
 
549
            predictor[ch] -= vmdaudio_table[b & 0x7F];
470
550
        else
471
 
            s->predictors[chan] += vmdaudio_table[buf[i]];
472
 
        s->predictors[chan] = av_clip_int16(s->predictors[chan]);
473
 
        out[i] = s->predictors[chan];
474
 
        chan ^= stereo;
475
 
    }
476
 
}
477
 
 
478
 
static int vmdaudio_loadsound(VmdAudioContext *s, unsigned char *data,
479
 
    const uint8_t *buf, int silent_chunks, int data_size)
480
 
{
481
 
    int silent_size = s->avctx->block_align * silent_chunks * s->out_bps;
482
 
 
483
 
    if (silent_chunks) {
484
 
        memset(data, s->out_bps == 2 ? 0x00 : 0x80, silent_size);
485
 
        data += silent_size;
486
 
    }
487
 
    if (s->avctx->bits_per_coded_sample == 16)
488
 
        vmdaudio_decode_audio(s, data, buf, data_size, s->avctx->channels == 2);
489
 
    else {
490
 
        /* just copy the data */
491
 
        memcpy(data, buf, data_size);
492
 
    }
493
 
 
494
 
    return silent_size + data_size * s->out_bps;
495
 
}
496
 
 
497
 
static int vmdaudio_decode_frame(AVCodecContext *avctx,
498
 
                                 void *data, int *data_size,
499
 
                                 AVPacket *avpkt)
 
551
            predictor[ch] += vmdaudio_table[b];
 
552
        predictor[ch] = av_clip_int16(predictor[ch]);
 
553
        *out++ = predictor[ch];
 
554
        ch ^= st;
 
555
    }
 
556
}
 
557
 
 
558
static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
 
559
                                 int *got_frame_ptr, AVPacket *avpkt)
500
560
{
501
561
    const uint8_t *buf = avpkt->data;
 
562
    const uint8_t *buf_end;
502
563
    int buf_size = avpkt->size;
503
564
    VmdAudioContext *s = avctx->priv_data;
504
 
    int block_type, silent_chunks;
505
 
    unsigned char *output_samples = (unsigned char *)data;
 
565
    int block_type, silent_chunks, audio_chunks;
 
566
    int ret;
 
567
    uint8_t *output_samples_u8;
 
568
    int16_t *output_samples_s16;
506
569
 
507
570
    if (buf_size < 16) {
508
571
        av_log(avctx, AV_LOG_WARNING, "skipping small junk packet\n");
509
 
        *data_size = 0;
 
572
        *got_frame_ptr = 0;
510
573
        return buf_size;
511
574
    }
512
575
 
518
581
    buf      += 16;
519
582
    buf_size -= 16;
520
583
 
 
584
    /* get number of silent chunks */
521
585
    silent_chunks = 0;
522
586
    if (block_type == BLOCK_TYPE_INITIAL) {
523
 
        uint32_t flags = AV_RB32(buf);
524
 
        silent_chunks  = av_popcount(flags);
 
587
        uint32_t flags;
 
588
        if (buf_size < 4) {
 
589
            av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
 
590
            return AVERROR(EINVAL);
 
591
        }
 
592
        flags         = AV_RB32(buf);
 
593
        silent_chunks = av_popcount(flags);
525
594
        buf      += 4;
526
595
        buf_size -= 4;
527
596
    } else if (block_type == BLOCK_TYPE_SILENCE) {
530
599
    }
531
600
 
532
601
    /* ensure output buffer is large enough */
533
 
    if (*data_size < (avctx->block_align*silent_chunks + buf_size) * s->out_bps)
534
 
        return -1;
535
 
 
536
 
    *data_size = vmdaudio_loadsound(s, output_samples, buf, silent_chunks, buf_size);
 
602
    audio_chunks = buf_size / s->chunk_size;
 
603
 
 
604
    /* get output buffer */
 
605
    s->frame.nb_samples = ((silent_chunks + audio_chunks) * avctx->block_align) / avctx->channels;
 
606
    if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
 
607
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
 
608
        return ret;
 
609
    }
 
610
    output_samples_u8  = s->frame.data[0];
 
611
    output_samples_s16 = (int16_t *)s->frame.data[0];
 
612
 
 
613
    /* decode silent chunks */
 
614
    if (silent_chunks > 0) {
 
615
        int silent_size = avctx->block_align * silent_chunks;
 
616
        if (s->out_bps == 2) {
 
617
            memset(output_samples_s16, 0x00, silent_size * 2);
 
618
            output_samples_s16 += silent_size;
 
619
        } else {
 
620
            memset(output_samples_u8,  0x80, silent_size);
 
621
            output_samples_u8 += silent_size;
 
622
        }
 
623
    }
 
624
 
 
625
    /* decode audio chunks */
 
626
    if (audio_chunks > 0) {
 
627
        buf_end = buf + buf_size;
 
628
        while (buf < buf_end) {
 
629
            if (s->out_bps == 2) {
 
630
                decode_audio_s16(output_samples_s16, buf, s->chunk_size,
 
631
                                 avctx->channels);
 
632
                output_samples_s16 += avctx->block_align;
 
633
            } else {
 
634
                memcpy(output_samples_u8, buf, s->chunk_size);
 
635
                output_samples_u8  += avctx->block_align;
 
636
            }
 
637
            buf += s->chunk_size;
 
638
        }
 
639
    }
 
640
 
 
641
    *got_frame_ptr   = 1;
 
642
    *(AVFrame *)data = s->frame;
537
643
 
538
644
    return avpkt->size;
539
645
}
544
650
 */
545
651
 
546
652
AVCodec ff_vmdvideo_decoder = {
547
 
    "vmdvideo",
548
 
    AVMEDIA_TYPE_VIDEO,
549
 
    CODEC_ID_VMDVIDEO,
550
 
    sizeof(VmdVideoContext),
551
 
    vmdvideo_decode_init,
552
 
    NULL,
553
 
    vmdvideo_decode_end,
554
 
    vmdvideo_decode_frame,
555
 
    CODEC_CAP_DR1,
 
653
    .name           = "vmdvideo",
 
654
    .type           = AVMEDIA_TYPE_VIDEO,
 
655
    .id             = CODEC_ID_VMDVIDEO,
 
656
    .priv_data_size = sizeof(VmdVideoContext),
 
657
    .init           = vmdvideo_decode_init,
 
658
    .close          = vmdvideo_decode_end,
 
659
    .decode         = vmdvideo_decode_frame,
 
660
    .capabilities   = CODEC_CAP_DR1,
556
661
    .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"),
557
662
};
558
663
 
559
664
AVCodec ff_vmdaudio_decoder = {
560
 
    "vmdaudio",
561
 
    AVMEDIA_TYPE_AUDIO,
562
 
    CODEC_ID_VMDAUDIO,
563
 
    sizeof(VmdAudioContext),
564
 
    vmdaudio_decode_init,
565
 
    NULL,
566
 
    NULL,
567
 
    vmdaudio_decode_frame,
 
665
    .name           = "vmdaudio",
 
666
    .type           = AVMEDIA_TYPE_AUDIO,
 
667
    .id             = CODEC_ID_VMDAUDIO,
 
668
    .priv_data_size = sizeof(VmdAudioContext),
 
669
    .init           = vmdaudio_decode_init,
 
670
    .decode         = vmdaudio_decode_frame,
 
671
    .capabilities   = CODEC_CAP_DR1,
568
672
    .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD audio"),
569
673
};