~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/idcin.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:
70
70
 
71
71
#include "libavutil/intreadwrite.h"
72
72
#include "avformat.h"
 
73
#include "internal.h"
73
74
 
74
75
#define HUFFMAN_TABLE_SIZE (64 * 1024)
75
76
#define IDCIN_FPS 14
153
154
    bytes_per_sample = avio_rl32(pb);
154
155
    channels = avio_rl32(pb);
155
156
 
156
 
    st = av_new_stream(s, 0);
 
157
    st = avformat_new_stream(s, NULL);
157
158
    if (!st)
158
159
        return AVERROR(ENOMEM);
159
 
    av_set_pts_info(st, 33, 1, IDCIN_FPS);
 
160
    avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);
160
161
    idcin->video_stream_index = st->index;
161
162
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
162
163
    st->codec->codec_id = CODEC_ID_IDCIN;
174
175
    /* if sample rate is 0, assume no audio */
175
176
    if (sample_rate) {
176
177
        idcin->audio_present = 1;
177
 
        st = av_new_stream(s, 0);
 
178
        st = avformat_new_stream(s, NULL);
178
179
        if (!st)
179
180
            return AVERROR(ENOMEM);
180
 
        av_set_pts_info(st, 33, 1, IDCIN_FPS);
 
181
        avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);
181
182
        idcin->audio_stream_index = st->index;
182
183
        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
183
184
        st->codec->codec_tag = 1;
292
293
}
293
294
 
294
295
AVInputFormat ff_idcin_demuxer = {
295
 
    "idcin",
296
 
    NULL_IF_CONFIG_SMALL("id Cinematic format"),
297
 
    sizeof(IdcinDemuxContext),
298
 
    idcin_probe,
299
 
    idcin_read_header,
300
 
    idcin_read_packet,
 
296
    .name           = "idcin",
 
297
    .long_name      = NULL_IF_CONFIG_SMALL("id Cinematic format"),
 
298
    .priv_data_size = sizeof(IdcinDemuxContext),
 
299
    .read_probe     = idcin_probe,
 
300
    .read_header    = idcin_read_header,
 
301
    .read_packet    = idcin_read_packet,
301
302
};