sd_ass: initialize structs for external tracks properly
[mplayer.git] / libmpdemux / demux_packet.h
blobd64291f4e0d8249346c1d074ef9fdd4af0f20ec8
1 /*
2 * This file is part of mplayer2.
4 * mplayer2 is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * mplayer2 is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with mplayer2; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_DEMUX_PACKET_H
20 #define MPLAYER_DEMUX_PACKET_H
22 #include <stdbool.h>
23 #include <sys/types.h>
25 // Holds one packet/frame/whatever
26 typedef struct demux_packet {
27 int len;
28 double pts;
29 double duration;
30 double stream_pts;
31 off_t pos; // position in index (AVI) or file (MPG)
32 unsigned char *buffer;
33 bool keyframe;
34 int refcount; // counter for the master packet, if 0, buffer can be free()d
35 struct demux_packet *master; //in clones, pointer to the master packet
36 struct demux_packet *next;
37 struct AVPacket *avpacket; // original libavformat packet (demux_lavf)
38 } demux_packet_t;
40 #endif /* MPLAYER_DEMUX_PACKET_H */