summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2016-07-07 18:24:17 -0400
committerBradley Sepos <[email protected]>2016-07-07 18:24:17 -0400
commitd332d4de16130d8774b59229f7119501c4512ba9 (patch)
tree6f6eddeb8b1cc94b31f3513b24cefe9efaef4f1f /libhb/stream.c
parenta923c2ac9e0fa578513dc29c27a7bc03c4fb1319 (diff)
Revert "libhb: don't ignore the return result from fread()"
Broke image previews on Linux and Windows (mingw). This reverts commit b7645e7842703d52c44feaa85cfb3c490e09c8dc.
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 7ea2e1ca9..f885cae3d 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -3280,24 +3280,19 @@ static int hb_ps_read_packet( hb_stream_t * stream, hb_buffer_t *b )
hb_buffer_realloc( b, b->alloc * 2 );
}
- // There are (hopefully) at least 8 bytes. More if this is mpeg2 pack.
- if (fread( cp+pos, 1, 8, stream->file_handle ) < 8)
- goto done;
+ // There are at least 8 bytes. More if this is mpeg2 pack.
+ fread( cp+pos, 1, 8, stream->file_handle );
int mark = cp[pos] >> 4;
pos += 8;
if ( mark != 0x02 )
{
// mpeg-2 pack,
- if (fread( cp+pos, 1, 2, stream->file_handle ) == 2)
- {
- int len;
- pos += 2;
- len = cp[start+13] & 0x7;
- if (len > 0 &&
- fread( cp+pos, 1, len, stream->file_handle ) == len)
- pos += len;
- }
+ fread( cp+pos, 1, 2, stream->file_handle );
+ pos += 2;
+ int len = cp[start+13] & 0x7;
+ fread( cp+pos, 1, len, stream->file_handle );
+ pos += len;
}
}
// Non-video streams can emulate start codes, so we need