~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/yop.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:
1
 
/**
2
 
 * @file
 
1
/*
3
2
 * Psygnosis YOP demuxer
4
3
 *
5
4
 * Copyright (C) 2010 Mohamed Naufal Basheer <naufal11@gmail.com>
25
24
 
26
25
#include "libavutil/intreadwrite.h"
27
26
#include "avformat.h"
 
27
#include "internal.h"
28
28
 
29
29
typedef struct yop_dec_context {
30
30
    AVPacket video_packet;
57
57
 
58
58
    int frame_rate, ret;
59
59
 
60
 
    audio_stream = av_new_stream(s, 0);
61
 
    video_stream = av_new_stream(s, 1);
 
60
    audio_stream = avformat_new_stream(s, NULL);
 
61
    video_stream = avformat_new_stream(s, NULL);
62
62
 
63
63
    // Extra data that will be passed to the decoder
64
64
    video_stream->codec->extradata_size = 8;
106
106
 
107
107
    avio_seek(pb, 2048, SEEK_SET);
108
108
 
109
 
    av_set_pts_info(video_stream, 32, 1, frame_rate);
 
109
    avpriv_set_pts_info(video_stream, 32, 1, frame_rate);
110
110
 
111
111
    return 0;
112
112
}
203
203
}
204
204
 
205
205
AVInputFormat ff_yop_demuxer = {
206
 
    "yop",
207
 
    NULL_IF_CONFIG_SMALL("Psygnosis YOP Format"),
208
 
    sizeof(YopDecContext),
209
 
    yop_probe,
210
 
    yop_read_header,
211
 
    yop_read_packet,
212
 
    yop_read_close,
213
 
    yop_read_seek,
 
206
    .name           = "yop",
 
207
    .long_name      = NULL_IF_CONFIG_SMALL("Psygnosis YOP Format"),
 
208
    .priv_data_size = sizeof(YopDecContext),
 
209
    .read_probe     = yop_probe,
 
210
    .read_header    = yop_read_header,
 
211
    .read_packet    = yop_read_packet,
 
212
    .read_close     = yop_read_close,
 
213
    .read_seek      = yop_read_seek,
214
214
    .extensions = "yop",
215
215
    .flags = AVFMT_GENERIC_INDEX,
216
216
};