[PATCH 4/6] demux_pva.c: fix data types and use calloc.

Reimar Döffinger <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
Improves behaviour for trac issue #2359.
---
 libmpdemux/demux_pva.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libmpdemux/demux_pva.c b/libmpdemux/demux_pva.c
index aa798c4f8..3aa9fb91e 100644
--- a/libmpdemux/demux_pva.c
+++ b/libmpdemux/demux_pva.c
@@ -51,7 +51,7 @@

 typedef struct {
 	off_t offset;
-	int size;
+	uint16_t size;
 	uint8_t type;
 	uint8_t is_packet_start;
 	float pts;
@@ -62,7 +62,7 @@ typedef struct {
 	float last_audio_pts;
 	float last_video_pts;
 	float video_pts_after_prebytes;
-	int video_size_after_prebytes;
+	uint16_t video_size_after_prebytes;
 	uint8_t prebytes_delivered;
 	uint8_t just_synced;
 	uint8_t synced_stream_id;
@@ -140,13 +140,12 @@ static demuxer_t * demux_open_pva (demuxer_t * demuxer)



-	priv=malloc(sizeof(pva_priv_t));
+	priv=calloc(1, sizeof(pva_priv_t));

 	if(demuxer->stream->type!=STREAMTYPE_FILE) demuxer->seekable=0;
 	else demuxer->seekable=1;

 	demuxer->priv=priv;
-	memset(demuxer->priv,0,sizeof(pva_priv_t));

 	if(!pva_sync(demuxer))
 	{
--
2.30.0

_______________________________________________
MPlayer-dev-eng mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.