avformat: Use ffio_read_size() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
122f86d859
commit
6dd83fab44
14 changed files with 91 additions and 69 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include "libavcodec/bytestream.h"
|
||||
#include "libavcodec/flac.h"
|
||||
#include "avformat.h"
|
||||
#include "avio_internal.h"
|
||||
#include "demux.h"
|
||||
#include "flac_picture.h"
|
||||
#include "internal.h"
|
||||
|
|
@ -100,11 +101,9 @@ static int flac_read_header(AVFormatContext *s)
|
|||
if (!buffer) {
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
ret = avio_read(s->pb, buffer, metadata_size);
|
||||
ret = ffio_read_size(s->pb, buffer, metadata_size);
|
||||
if (ret < 0) {
|
||||
RETURN_ERROR(ret);
|
||||
} else if (ret != metadata_size) {
|
||||
RETURN_ERROR(AVERROR_EOF);
|
||||
}
|
||||
break;
|
||||
/* skip metadata block for unsupported types */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue