aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-09 18:00:58 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-09 18:00:58 +0000
commitb5eaa436cf75b401e62f696947bf1c4b6e518e15 (patch)
treee08dcf53262b56fd0adf43244a91b89ac1eae70b /libmpdemux
parent0336518548cf5a3a7e9b6925394f7cd8e4912a38 (diff)
check if prop_hdr==NULL insteda of sig11
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8853 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/pnm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libmpdemux/pnm.c b/libmpdemux/pnm.c
index d1a8e3bcbd..154a47312e 100644
--- a/libmpdemux/pnm.c
+++ b/libmpdemux/pnm.c
@@ -512,10 +512,11 @@ static int pnm_get_headers(pnm_t *p, int *need_response) {
ptr+=chunk_size;
}
- /* set pre-buffer to a low number */
- /* prop_hdr[36]=0x01;
- prop_hdr[37]=0xd6; */
-
+ if (!prop_hdr) {
+ printf("input_pnm: error while parsing headers.\n");
+ return 0;
+ }
+
/* set data offset */
size--;
prop_hdr[42]=(size>>24)%0xff;
@@ -740,7 +741,7 @@ static int pnm_get_stream_chunk(pnm_t *p) {
pnm_t *pnm_connect(int fd, char *path) {
pnm_t *p=malloc(sizeof(pnm_t));
- int need_response;
+ int need_response=0;
p->path=strdup(path);
p->s=fd;