From 0c747c320b563bd6c9489d1cfd1a9b24a0d94d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 29 Mar 2007 17:00:32 +0000 Subject: Remove unused bytes_per_sec attribute on demux_ra_t. Move block_align and make seek_flag a 1-bit field. This reduces as much as possible the padding. Note that block_align should remain on the same cacheline as the fifo pointers, as it's used at every chunk, while the rest of the fields are used only when seeking. CVS patchset: 8760 CVS date: 2007/03/29 17:00:32 --- src/demuxers/demux_realaudio.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 0b692f185..bf8de0dad 100644 --- a/src/demuxers/demux_realaudio.c +++ b/src/demuxers/demux_realaudio.c @@ -22,7 +22,7 @@ * RealAudio File Demuxer by Mike Melanson (melanson@pcisys.net) * improved by James Stembridge (jstembridge@users.sourceforge.net) * - * $Id: demux_realaudio.c,v 1.33 2007/01/19 00:26:40 dgp85 Exp $ + * $Id: demux_realaudio.c,v 1.34 2007/03/29 17:00:32 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -57,16 +57,15 @@ typedef struct { unsigned int fourcc; unsigned int audio_type; + unsigned short block_align; + + uint8_t seek_flag:1; /* this is set when a seek just occurred */ + off_t data_start; off_t data_size; - unsigned short block_align; - unsigned int bytes_per_sec; - unsigned char *header; unsigned int header_size; - - int seek_flag; /* this is set when a seek just occurred */ } demux_ra_t; typedef struct { @@ -316,10 +315,7 @@ static int demux_ra_get_status (demux_plugin_t *this_gen) { static int demux_ra_get_stream_length (demux_plugin_t *this_gen) { demux_ra_t *this = (demux_ra_t *) this_gen; - if(this->bytes_per_sec) - return (int)((int64_t) this->data_size * 1000 / this->bytes_per_sec); - else - return 0; + return 0; } static uint32_t demux_ra_get_capabilities(demux_plugin_t *this_gen) { -- cgit v1.2.3