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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        return 0;
52
52
}
53
53
 
54
 
static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
54
static int dxa_read_header(AVFormatContext *s)
55
55
{
56
56
    AVIOContext *pb = s->pb;
57
57
    DXAContext *c = s->priv_data;
107
107
        ret = ff_get_wav_header(pb, ast->codec, fsize);
108
108
        if (ret < 0)
109
109
            return ret;
 
110
        if (ast->codec->sample_rate > 0)
 
111
            avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
110
112
        // find 'data' chunk
111
113
        while(avio_tell(pb) < c->vidpos && !pb->eof_reached){
112
114
            tag = avio_rl32(pb);
124
126
 
125
127
    /* now we are ready: build format streams */
126
128
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
127
 
    st->codec->codec_id   = CODEC_ID_DXA;
 
129
    st->codec->codec_id   = AV_CODEC_ID_DXA;
128
130
    st->codec->width      = w;
129
131
    st->codec->height     = h;
130
132
    av_reduce(&den, &num, den, num, (1UL<<31)-1);