~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavformat/wc3movie.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 *   http://www.pcisys.net/~melanson/codecs/
28
28
 */
29
29
 
 
30
#include "libavutil/channel_layout.h"
30
31
#include "libavutil/intreadwrite.h"
31
32
#include "libavutil/dict.h"
32
33
#include "avformat.h"
83
84
    return AVPROBE_SCORE_MAX;
84
85
}
85
86
 
86
 
static int wc3_read_header(AVFormatContext *s,
87
 
                           AVFormatParameters *ap)
 
87
static int wc3_read_header(AVFormatContext *s)
88
88
{
89
89
    Wc3DemuxContext *wc3 = s->priv_data;
90
90
    AVIOContext *pb = s->pb;
170
170
    avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
171
171
    wc3->video_stream_index = st->index;
172
172
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
173
 
    st->codec->codec_id = CODEC_ID_XAN_WC3;
 
173
    st->codec->codec_id = AV_CODEC_ID_XAN_WC3;
174
174
    st->codec->codec_tag = 0;  /* no fourcc */
175
175
    st->codec->width = wc3->width;
176
176
    st->codec->height = wc3->height;
181
181
    avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
182
182
    wc3->audio_stream_index = st->index;
183
183
    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
184
 
    st->codec->codec_id = CODEC_ID_PCM_S16LE;
 
184
    st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
185
185
    st->codec->codec_tag = 1;
186
186
    st->codec->channels = WC3_AUDIO_CHANNELS;
 
187
    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
187
188
    st->codec->bits_per_coded_sample = WC3_AUDIO_BITS;
188
189
    st->codec->sample_rate = WC3_SAMPLE_RATE;
189
190
    st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
294
295
 
295
296
AVInputFormat ff_wc3_demuxer = {
296
297
    .name           = "wc3movie",
297
 
    .long_name      = NULL_IF_CONFIG_SMALL("Wing Commander III movie format"),
 
298
    .long_name      = NULL_IF_CONFIG_SMALL("Wing Commander III movie"),
298
299
    .priv_data_size = sizeof(Wc3DemuxContext),
299
300
    .read_probe     = wc3_probe,
300
301
    .read_header    = wc3_read_header,