Skip to content
Snippets Groups Projects
Commit 0528226a authored by Nidhi Makhijani's avatar Nidhi Makhijani Committed by Diego Biurrun
Browse files

a64: Return correct error code on invalid data stream


Signed-off-by: default avatarDiego Biurrun <diego@biurrun.de>
parent e070d0a5
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ static int a64_write_header(AVFormatContext *s) ...@@ -38,7 +38,7 @@ static int a64_write_header(AVFormatContext *s)
if (avctx->extradata_size < 4) { if (avctx->extradata_size < 4) {
av_log(s, AV_LOG_ERROR, "Missing extradata\n"); av_log(s, AV_LOG_ERROR, "Missing extradata\n");
return AVERROR(EINVAL); return AVERROR_INVALIDDATA;
} }
switch (avctx->codec->id) { switch (avctx->codec->id) {
...@@ -53,7 +53,7 @@ static int a64_write_header(AVFormatContext *s) ...@@ -53,7 +53,7 @@ static int a64_write_header(AVFormatContext *s)
header[4] = 3; header[4] = 3;
break; break;
default: default:
return AVERROR(EINVAL); return AVERROR_INVALIDDATA;
} }
avio_write(s->pb, header, 2); avio_write(s->pb, header, 2);
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment