aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-17 17:30:19 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-23 07:10:56 +0200
commita5572f5a80abdf71c222926dc163182aec84e105 (patch)
tree81125003b24905464a66d9125c33c08638fcd994
parent39f5bb6a3f7c378561f3232d6a489c9fa909cde7 (diff)
downloadffmpeg-a5572f5a80abdf71c222926dc163182aec84e105.tar.gz
avformat/matroskaenc: Forward errors from avpriv_split_xiph_headers()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavformat/matroskaenc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 9ad590cb93..1c1ea71f59 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -605,17 +605,18 @@ static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb,
const uint8_t *header_start[3];
int header_len[3];
int first_header_size;
- int j;
+ int err, j;
if (par->codec_id == AV_CODEC_ID_VORBIS)
first_header_size = 30;
else
first_header_size = 42;
- if (avpriv_split_xiph_headers(par->extradata, par->extradata_size,
- first_header_size, header_start, header_len) < 0) {
+ err = avpriv_split_xiph_headers(par->extradata, par->extradata_size,
+ first_header_size, header_start, header_len);
+ if (err < 0) {
av_log(s, AV_LOG_ERROR, "Extradata corrupt.\n");
- return -1;
+ return err;
}
avio_w8(pb, 2); // number packets - 1