diff options
-rw-r--r-- | libhb/encavcodec.c | 6 | ||||
-rw-r--r-- | libhb/hb.c | 8 | ||||
-rw-r--r-- | libhb/stream.c | 19 |
3 files changed, 9 insertions, 24 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index a8781f057..f7ed25233 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -302,11 +302,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) fseek( pv->file, 0, SEEK_SET ); log = malloc( size + 1 ); log[size] = '\0'; - if (size > 0 && - fread( log, size, 1, pv->file ) < size) - { - hb_log( "encavcodecInit: Failed to read %s" , filename); - } + fread( log, size, 1, pv->file ); fclose( pv->file ); pv->file = NULL; diff --git a/libhb/hb.c b/libhb/hb.c index 3f63eb8d0..eb62d4f45 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -696,13 +696,7 @@ hb_buffer_t * hb_read_preview(hb_handle_t * h, hb_title_t *title, int preview) for (hh = 0; hh < h; hh++) { - if (fread(data, w, 1, file) < w) - { - hb_error( "hb_read_preview: Failed to read line %d from %s" , hh, filename ); - hb_buffer_close(&buf); - break; - } - + fread(data, w, 1, file); data += stride; } } 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 |