diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_fli.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_matroska.c | 6 | ||||
-rw-r--r-- | src/demuxers/matroska.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index fabc2c788..12ae81609 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -244,7 +244,7 @@ static void demux_fli_send_headers(demux_plugin_t *this_gen) { BUF_FLAG_FRAME_END; buf->decoder_info[0] = this->frame_pts_inc; /* initial video_step */ buf->size = this->bih.biSize; - memcpy(buf->content, &this->bih, sizeof(xine_bmiheader) + this->bih.biSize); + memcpy(buf->content, &this->bih, this->bih.biSize); buf->type = BUF_VIDEO_FLI; this->video_fifo->put (this->video_fifo, buf); } diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index a8af6c44f..e6dd564a6 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -1298,7 +1298,7 @@ static int parse_track_entry(demux_matroska_t *this, matroska_track_t *track) { lprintf("MATROSKA_CODEC_ID_V_MPEG4_*\n"); /* create a bitmap info header struct for MPEG 4 */ - bih = malloc(sizeof(xine_bmiheader) + track->codec_private_len); + bih = calloc(1, sizeof(xine_bmiheader) + track->codec_private_len); bih->biSize = sizeof(xine_bmiheader) + track->codec_private_len; bih->biCompression = ME_FOURCC('M', 'P', '4', 'S'); bih->biWidth = track->video_track->pixel_width; @@ -1319,7 +1319,7 @@ static int parse_track_entry(demux_matroska_t *this, matroska_track_t *track) { lprintf("MATROSKA_CODEC_ID_V_MPEG4_AVC\n"); /* create a bitmap info header struct for h264 */ - bih = malloc(sizeof(xine_bmiheader) + track->codec_private_len); + bih = calloc(1, sizeof(xine_bmiheader) + track->codec_private_len); bih->biSize = sizeof(xine_bmiheader) + track->codec_private_len; bih->biCompression = ME_FOURCC('a', 'v', 'c', '1'); bih->biWidth = track->video_track->pixel_width; @@ -1896,7 +1896,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, lprintf("no lacing\n"); block_size_left = (this->block_data + block_size) - data; - lprintf("size: %d, block_size: %" PRIu64 "\n", block_size_left, block_size); + lprintf("size: %d, block_size: %u\n", block_size_left, block_size); if (track->handle_content != NULL) { track->handle_content((demux_plugin_t *)this, track, diff --git a/src/demuxers/matroska.h b/src/demuxers/matroska.h index 6806c207d..23af84af0 100644 --- a/src/demuxers/matroska.h +++ b/src/demuxers/matroska.h @@ -235,7 +235,7 @@ struct matroska_track_s { void (*handle_content) (demux_plugin_t *this_gen, matroska_track_t *track, int decoder_flags, - uint8_t *data, int data_len, + uint8_t *data, size_t data_len, int64_t data_pts, int data_duration, int input_normpos, int input_time); }; |