annotate a64.c @ 6449:3a28e6827095 libavformat

Solving memory leak and initialization problem with prev_pkt / pkt.
author bindhammer
date Tue, 31 Aug 2010 07:15:11 +0000
parents d2d2972c9715
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
1 /*
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
2 * a64 muxer
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
3 * Copyright (c) 2009 Tobias Bindhammer
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
4 *
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
5 * This file is part of FFmpeg.
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
6 *
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
11 *
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
15 * Lesser General Public License for more details.
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
16 *
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
20 */
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
21
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
22 #include "libavcodec/avcodec.h"
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
23 #include "libavcodec/a64enc.h"
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
24 #include "libavcodec/bytestream.h"
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
25 #include "avformat.h"
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
26
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
27 typedef struct A64MuxerContext {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
28 int interleaved;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
29 AVPacket prev_pkt;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
30 int prev_frame_count;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
31 } A64MuxerContext;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
32
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
33 static int a64_write_header(struct AVFormatContext *s)
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
34 {
6417
d2d2972c9715 Cosmetic changes.
bindhammer
parents: 6416
diff changeset
35 AVCodecContext *avctx = s->streams[0]->codec;
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
36 A64MuxerContext *c = s->priv_data;
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
37 uint8_t header[5] = {
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
38 0x00, //load
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
39 0x40, //address
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
40 0x00, //mode
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
41 0x00, //charset_lifetime (multi only)
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
42 0x00 //fps in 50/fps;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
43 };
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
44 c->interleaved = 0;
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
45 switch (avctx->codec->id) {
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
46 case CODEC_ID_A64_MULTI:
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
47 header[2] = 0x00;
6416
e60cca9e99a3 Insert info from extradata into header
bindhammer
parents: 6415
diff changeset
48 header[3] = AV_RB32(avctx->extradata+0);
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
49 header[4] = 2;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
50 break;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
51 case CODEC_ID_A64_MULTI5:
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
52 header[2] = 0x01;
6416
e60cca9e99a3 Insert info from extradata into header
bindhammer
parents: 6415
diff changeset
53 header[3] = AV_RB32(avctx->extradata+0);
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
54 header[4] = 3;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
55 break;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
56 default:
6402
33ebda64cac1 fixed some return values and deprecated CODEC_TYPE_VIDEO.
bindhammer
parents: 6397
diff changeset
57 return AVERROR(EINVAL);
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
58 break;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
59 }
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
60 put_buffer(s->pb, header, 2);
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
61 c->prev_pkt.size = 0;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
62 c->prev_frame_count = 0;
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
63 return 0;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
64 }
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
65
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
66 static int a64_write_packet(struct AVFormatContext *s, AVPacket *pkt)
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
67 {
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
68 AVCodecContext *avctx = s->streams[0]->codec;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
69 A64MuxerContext *c = s->priv_data;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
70 int i, j;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
71 int ch_chunksize;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
72 int lifetime;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
73 int frame_count;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
74 int charset_size;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
75 int frame_size;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
76 int num_frames;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
77
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
78 /* fetch values from extradata */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
79 switch (avctx->codec->id) {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
80 case CODEC_ID_A64_MULTI:
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
81 case CODEC_ID_A64_MULTI5:
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
82 if(c->interleaved) {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
83 /* Write interleaved, means we insert chunks of the future charset before each current frame.
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
84 * Reason: if we load 1 charset + corresponding frames in one block on c64, we need to store
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
85 * them first and then display frame by frame to keep in sync. Thus we would read and write
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
86 * the data for colram from/to ram first and waste too much time. If we interleave and send the
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
87 * charset beforehand, we assemble a new charset chunk by chunk, write current screen data to
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
88 * screen-ram to be displayed and decode the colram directly to colram-location $d800 during
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
89 * the overscan, while reading directly from source
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
90 * This is the only way so far, to achieve 25fps on c64 */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
91 if(avctx->extradata) {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
92 /* fetch values from extradata */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
93 lifetime = AV_RB32(avctx->extradata + 0);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
94 frame_count = AV_RB32(avctx->extradata + 4);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
95 charset_size = AV_RB32(avctx->extradata + 8);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
96 frame_size = AV_RB32(avctx->extradata + 12);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
97
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
98 /* TODO: sanity checks? */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
99 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
100 else {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
101 av_log(avctx, AV_LOG_ERROR, "extradata not set\n");
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
102 return AVERROR(EINVAL);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
103 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
104 ch_chunksize=charset_size/lifetime;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
105 /* TODO: check if charset/size is % lifetime, but maybe check in codec */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
106 if(pkt->data) num_frames = lifetime;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
107 else num_frames = c->prev_frame_count;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
108 for(i = 0; i < num_frames; i++) {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
109 if(pkt->data) {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
110 /* if available, put newest charset chunk into buffer */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
111 put_buffer(s->pb, pkt->data + ch_chunksize * i, ch_chunksize);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
112 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
113 else {
6417
d2d2972c9715 Cosmetic changes.
bindhammer
parents: 6416
diff changeset
114 /* a bit ugly, but is there an alternative to put many zeros? */
d2d2972c9715 Cosmetic changes.
bindhammer
parents: 6416
diff changeset
115 for(j = 0; j < ch_chunksize; j++) put_byte(s->pb, 0);
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
116 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
117 if(c->prev_pkt.data) {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
118 /* put frame (screen + colram) from last packet into buffer */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
119 put_buffer(s->pb, c->prev_pkt.data + charset_size + frame_size * i, frame_size);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
120 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
121 else {
6417
d2d2972c9715 Cosmetic changes.
bindhammer
parents: 6416
diff changeset
122 /* a bit ugly, but is there an alternative to put many zeros? */
d2d2972c9715 Cosmetic changes.
bindhammer
parents: 6416
diff changeset
123 for(j = 0; j < frame_size; j++) put_byte(s->pb, 0);
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
124 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
125 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
126 /* backup current packet for next turn */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
127 if(pkt->data) {
6449
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
128 /* no backup packet yet? create one! */
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
129 if(!c->prev_pkt.data) av_new_packet(&c->prev_pkt, pkt->size);
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
130 /* we have a packet and data is big enough, reuse it */
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
131 if(c->prev_pkt.data && c->prev_pkt.size >= pkt->size) {
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
132 memcpy(c->prev_pkt.data, pkt->data, pkt->size);
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
133 c->prev_pkt.size = pkt->size;
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
134 } else {
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
135 av_log(avctx, AV_LOG_ERROR, "Too less memory for prev_pkt.\n");
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
136 return AVERROR(ENOMEM);
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
137 }
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
138 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
139 c->prev_frame_count = frame_count;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
140 break;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
141 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
142 default:
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
143 /* Write things as is. Nice for self-contained frames from non-multicolor modes or if played
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
144 * directly from ram and not from a streaming device (rrnet/mmc) */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
145 if(pkt) put_buffer(s->pb, pkt->data, pkt->size);
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
146 break;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
147 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
148
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
149 put_flush_packet(s->pb);
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
150 return 0;
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
151 }
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
152
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
153 static int a64_write_trailer(struct AVFormatContext *s)
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
154 {
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
155 A64MuxerContext *c = s->priv_data;
6449
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
156 AVPacket pkt = {0};
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
157 /* need to flush last packet? */
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
158 if(c->interleaved) a64_write_packet(s, &pkt);
6449
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
159 /* discard backed up packet */
3a28e6827095 Solving memory leak and initialization problem with prev_pkt / pkt.
bindhammer
parents: 6417
diff changeset
160 if(c->prev_pkt.data) av_destruct_packet(&c->prev_pkt);
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
161 return 0;
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
162 }
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
163
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
164 AVOutputFormat a64_muxer = {
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
165 .name = "a64",
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
166 .long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
167 .mime_type = NULL,
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
168 .extensions = "a64, A64",
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
169 .priv_data_size = sizeof (A64Context),
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
170 .video_codec = CODEC_ID_A64_MULTI,
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
171 a64_write_header,
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
172 a64_write_packet,
6415
d2ca6ecc8b43 Added option to write frames interleaved (yet disabled)
bindhammer
parents: 6402
diff changeset
173 a64_write_trailer
6397
4ba4733291ae Corresponding muxer for the a64 codec
bindhammer
parents:
diff changeset
174 };