From 53ac3806716cfab072241bb157cd4a6120fa8f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 26 Mar 2007 21:18:52 +0000 Subject: Optimise the demux_mpeg_pes_t structure a bit, instead of using two int32_t as boolean, and one int for just two LSBs, use a 1/1/2 bitmask, saves 11 bytes of memory (and probably also cpu instructions as there is almost no arithmetic done with it, but just logic that can be easily used bitwise. CVS patchset: 8753 CVS date: 2007/03/26 21:18:52 --- src/demuxers/demux_mpeg_pes.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index 8b1a3d2e9..486b220f8 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_pes.c,v 1.41 2007/03/26 21:06:32 dgp85 Exp $ + * $Id: demux_mpeg_pes.c,v 1.42 2007/03/26 21:18:52 dgp85 Exp $ * * demultiplexer for mpeg 2 PES (Packetized Elementary Streams) * reads streams of variable blocksizes @@ -89,10 +89,10 @@ typedef struct demux_mpeg_pes_s { int64_t pts; int64_t dts; uint32_t stream_id; - int32_t mpeg1; - int32_t wait_for_program_stream_pack_header; - int mpeg12_h264_detected; - + uint8_t mpeg1:1; + uint8_t wait_for_program_stream_pack_header:1; + uint8_t mpeg12_h264_detected:2; + int64_t last_cell_time; off_t last_cell_pos; int last_begin_time; -- cgit v1.2.3