summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_mpeg_block.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-06-20 16:38:25 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-06-20 16:38:25 +0100
commit3ce0de86ad429962ab581b9af762aa5dc9d3f156 (patch)
tree4640aaa3ece95b03f3ee7ef74e5162005347753a /src/demuxers/demux_mpeg_block.c
parent17c9a01cbafd5ff0e6645f96f8ac084fbf239e4d (diff)
parentf3974e74f2f1548bf07604fddfa60cf75b2fda57 (diff)
downloadxine-lib-3ce0de86ad429962ab581b9af762aa5dc9d3f156.tar.gz
xine-lib-3ce0de86ad429962ab581b9af762aa5dc9d3f156.tar.bz2
Merge the avutil branch; port the "raw" video output plugin.
--HG-- rename : src/combined/ffmpeg/ff_dvaudio_decoder.c => src/audio_dec/ff_dvaudio_decoder.c rename : src/combined/ffmpeg/ffmpeg_encoder.c => src/dxr3/ffmpeg_encoder.c
Diffstat (limited to 'src/demuxers/demux_mpeg_block.c')
-rw-r--r--src/demuxers/demux_mpeg_block.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 034416f77..8d2ec26a2 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.c
@@ -31,6 +31,8 @@
#include <unistd.h>
#include <string.h>
+#include <mem.h>
+
#define LOG_MODULE "demux_mpeg_block"
#define LOG_VERBOSE
/*
@@ -70,7 +72,6 @@ typedef struct demux_mpeg_block_s {
char cur_mrl[256];
uint8_t *scratch;
- void *scratch_base;
int64_t nav_last_end_pts;
int64_t nav_last_start_pts;
@@ -1176,7 +1177,7 @@ static void demux_mpeg_block_dispose (demux_plugin_t *this_gen) {
demux_mpeg_block_t *this = (demux_mpeg_block_t *) this_gen;
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
}
@@ -1385,7 +1386,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
this->demux_plugin.get_optional_data = demux_mpeg_block_get_optional_data;
this->demux_plugin.demux_class = class_gen;
- this->scratch = xine_xmalloc_aligned (512, 4096, &this->scratch_base);
+ this->scratch = av_mallocz(4096);
this->status = DEMUX_FINISHED;
lprintf ("open_plugin:detection_method=%d\n",
@@ -1397,7 +1398,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
/* use demux_mpeg for non-block devices */
if (!(input->get_capabilities(input) & INPUT_CAP_BLOCK)) {
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}
@@ -1411,7 +1412,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
this->blocksize = demux_mpeg_detect_blocksize( this, input );
if (!this->blocksize) {
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}
@@ -1424,7 +1425,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
|| (this->scratch[2] != 0x01) || (this->scratch[3] != 0xba)) {
lprintf("open_plugin:scratch failed\n");
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}
@@ -1432,7 +1433,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
/* if it's a file then make sure it's mpeg-2 */
if ( !input->get_blocksize(input)
&& ((this->scratch[4]>>4) != 4) ) {
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}
@@ -1446,7 +1447,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
break;
}
}
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}
@@ -1463,7 +1464,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
this->blocksize = demux_mpeg_detect_blocksize( this, input );
if (!this->blocksize) {
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}
@@ -1473,7 +1474,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
break;
default:
- free (this->scratch_base);
+ av_free (this->scratch);
free (this);
return NULL;
}