mirror of https://github.com/mpv-player/mpv
check if prop_hdr==NULL insteda of sig11
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8853 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0336518548
commit
b5eaa436cf
|
@ -512,10 +512,11 @@ static int pnm_get_headers(pnm_t *p, int *need_response) {
|
||||||
ptr+=chunk_size;
|
ptr+=chunk_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set pre-buffer to a low number */
|
if (!prop_hdr) {
|
||||||
/* prop_hdr[36]=0x01;
|
printf("input_pnm: error while parsing headers.\n");
|
||||||
prop_hdr[37]=0xd6; */
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* set data offset */
|
/* set data offset */
|
||||||
size--;
|
size--;
|
||||||
prop_hdr[42]=(size>>24)%0xff;
|
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 *pnm_connect(int fd, char *path) {
|
||||||
|
|
||||||
pnm_t *p=malloc(sizeof(pnm_t));
|
pnm_t *p=malloc(sizeof(pnm_t));
|
||||||
int need_response;
|
int need_response=0;
|
||||||
|
|
||||||
p->path=strdup(path);
|
p->path=strdup(path);
|
||||||
p->s=fd;
|
p->s=fd;
|
||||||
|
|
Loading…
Reference in New Issue