~ubuntu-branches/ubuntu/utopic/ffmpeg-debian/utopic

« back to all changes in this revision

Viewing changes to libavformat/libnut.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 09:20:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120092053-izz63p40hc98qfgp
Tags: 3:0.svn20090119-1ubuntu1
* merge from debian. LP: #318501
* new version fixes CVE-2008-3230, LP: #253767

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#define ID_LENGTH (strlen(ID_STRING) + 1)
34
34
 
35
35
typedef struct {
36
 
    nut_context_t * nut;
37
 
    nut_stream_header_t * s;
 
36
    nut_context_tt * nut;
 
37
    nut_stream_header_tt * s;
38
38
} NUTContext;
39
39
 
40
40
static const AVCodecTag nut_tags[] = {
44
44
    { 0, 0 },
45
45
};
46
46
 
47
 
#ifdef CONFIG_LIBNUT_MUXER
 
47
#if CONFIG_LIBNUT_MUXER
48
48
static int av_write(void * h, size_t len, const uint8_t * buf) {
49
49
    ByteIOContext * bc = h;
50
50
    put_buffer(bc, buf, len);
55
55
static int nut_write_header(AVFormatContext * avf) {
56
56
    NUTContext * priv = avf->priv_data;
57
57
    ByteIOContext * bc = avf->pb;
58
 
    nut_muxer_opts_t mopts = {
 
58
    nut_muxer_opts_tt mopts = {
59
59
        .output = {
60
60
            .priv = bc,
61
61
            .write = av_write,
66
66
        .max_distance = 32768,
67
67
        .fti = NULL,
68
68
    };
69
 
    nut_stream_header_t * s;
 
69
    nut_stream_header_tt * s;
70
70
    int i;
71
71
 
72
72
    priv->s = s = av_mallocz((avf->nb_streams + 1) * sizeof*s);
123
123
 
124
124
static int nut_write_packet(AVFormatContext * avf, AVPacket * pkt) {
125
125
    NUTContext * priv = avf->priv_data;
126
 
    nut_packet_t p;
 
126
    nut_packet_tt p;
127
127
 
128
128
    p.len = pkt->size;
129
129
    p.stream = pkt->stream_index;
188
188
static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
189
189
    NUTContext * priv = avf->priv_data;
190
190
    ByteIOContext * bc = avf->pb;
191
 
    nut_demuxer_opts_t dopts = {
 
191
    nut_demuxer_opts_tt dopts = {
192
192
        .input = {
193
193
            .priv = bc,
194
194
            .seek = av_seek,
200
200
        .read_index = 1,
201
201
        .cache_syncpoints = 1,
202
202
    };
203
 
    nut_context_t * nut = priv->nut = nut_demuxer_init(&dopts);
204
 
    nut_stream_header_t * s;
 
203
    nut_context_tt * nut = priv->nut = nut_demuxer_init(&dopts);
 
204
    nut_stream_header_tt * s;
205
205
    int ret, i;
206
206
 
207
207
    if ((ret = nut_read_headers(nut, &s, NULL))) {
258
258
 
259
259
static int nut_read_packet(AVFormatContext * avf, AVPacket * pkt) {
260
260
    NUTContext * priv = avf->priv_data;
261
 
    nut_packet_t pd;
 
261
    nut_packet_tt pd;
262
262
    int ret;
263
263
 
264
264
    ret = nut_read_next_packet(priv->nut, &pd);