mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/matroskaenc: Forward errors from avpriv_split_xiph_headers()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
39f5bb6a3f
commit
a5572f5a80
@ -605,17 +605,18 @@ static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb,
|
|||||||
const uint8_t *header_start[3];
|
const uint8_t *header_start[3];
|
||||||
int header_len[3];
|
int header_len[3];
|
||||||
int first_header_size;
|
int first_header_size;
|
||||||
int j;
|
int err, j;
|
||||||
|
|
||||||
if (par->codec_id == AV_CODEC_ID_VORBIS)
|
if (par->codec_id == AV_CODEC_ID_VORBIS)
|
||||||
first_header_size = 30;
|
first_header_size = 30;
|
||||||
else
|
else
|
||||||
first_header_size = 42;
|
first_header_size = 42;
|
||||||
|
|
||||||
if (avpriv_split_xiph_headers(par->extradata, par->extradata_size,
|
err = avpriv_split_xiph_headers(par->extradata, par->extradata_size,
|
||||||
first_header_size, header_start, header_len) < 0) {
|
first_header_size, header_start, header_len);
|
||||||
|
if (err < 0) {
|
||||||
av_log(s, AV_LOG_ERROR, "Extradata corrupt.\n");
|
av_log(s, AV_LOG_ERROR, "Extradata corrupt.\n");
|
||||||
return -1;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
avio_w8(pb, 2); // number packets - 1
|
avio_w8(pb, 2); // number packets - 1
|
||||||
|
Loading…
Reference in New Issue
Block a user