~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavformat/pmpdec.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    return 0;
40
40
}
41
41
 
42
 
static int pmp_header(AVFormatContext *s, AVFormatParameters *ap)
 
42
static int pmp_header(AVFormatContext *s)
43
43
{
44
44
    PMPContext *pmp = s->priv_data;
45
45
    AVIOContext *pb = s->pb;
46
46
    int tb_num, tb_den;
47
47
    int index_cnt;
48
 
    int audio_codec_id = CODEC_ID_NONE;
 
48
    int audio_codec_id = AV_CODEC_ID_NONE;
49
49
    int srate, channels;
50
50
    int i;
51
51
    uint64_t pos;
56
56
    avio_skip(pb, 8);
57
57
    switch (avio_rl32(pb)) {
58
58
    case 0:
59
 
        vst->codec->codec_id = CODEC_ID_MPEG4;
 
59
        vst->codec->codec_id = AV_CODEC_ID_MPEG4;
60
60
        break;
61
61
    case 1:
62
 
        vst->codec->codec_id = CODEC_ID_H264;
 
62
        vst->codec->codec_id = AV_CODEC_ID_H264;
63
63
        break;
64
64
    default:
65
65
        av_log(s, AV_LOG_ERROR, "Unsupported video format\n");
77
77
 
78
78
    switch (avio_rl32(pb)) {
79
79
    case 0:
80
 
        audio_codec_id = CODEC_ID_MP3;
 
80
        audio_codec_id = AV_CODEC_ID_MP3;
81
81
        break;
82
82
    case 1:
83
83
        av_log(s, AV_LOG_WARNING, "AAC is not yet correctly supported\n");
84
 
        audio_codec_id = CODEC_ID_AAC;
 
84
        audio_codec_id = AV_CODEC_ID_AAC;
85
85
        break;
86
86
    default:
87
87
        av_log(s, AV_LOG_ERROR, "Unsupported audio format\n");
170
170
 
171
171
AVInputFormat ff_pmp_demuxer = {
172
172
    .name           = "pmp",
173
 
    .long_name      = NULL_IF_CONFIG_SMALL("Playstation Portable PMP format"),
 
173
    .long_name      = NULL_IF_CONFIG_SMALL("Playstation Portable PMP"),
174
174
    .priv_data_size = sizeof(PMPContext),
175
175
    .read_probe     = pmp_probe,
176
176
    .read_header    = pmp_header,