Skip to content
Snippets Groups Projects
Commit 0332324a authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

Dont give up after 100kb of zero bytes but returnd EAGAIN

fixes issue1729

Originally committed as revision 21738 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 80242f9b
No related branches found
No related tags found
No related merge requests found
...@@ -247,8 +247,13 @@ static int mpegps_read_pes_header(AVFormatContext *s, ...@@ -247,8 +247,13 @@ static int mpegps_read_pes_header(AVFormatContext *s,
startcode = find_next_start_code(s->pb, &size, &m->header_state); startcode = find_next_start_code(s->pb, &size, &m->header_state);
last_sync = url_ftell(s->pb); last_sync = url_ftell(s->pb);
//printf("startcode=%x pos=0x%"PRIx64"\n", startcode, url_ftell(s->pb)); //printf("startcode=%x pos=0x%"PRIx64"\n", startcode, url_ftell(s->pb));
if (startcode < 0) if (startcode < 0){
return AVERROR(EIO); if(url_feof(s->pb))
return AVERROR_EOF;
//FIXME we should remember header_state
return AVERROR(EAGAIN);
}
if (startcode == PACK_START_CODE) if (startcode == PACK_START_CODE)
goto redo; goto redo;
if (startcode == SYSTEM_HEADER_START_CODE) if (startcode == SYSTEM_HEADER_START_CODE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment