summaryrefslogtreecommitdiff
path: root/libavformat/anm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-13 14:03:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-13 14:03:22 +0100
commit849f015406e77921a2adbe05e58b0e65cbf035c5 (patch)
tree05a8b30cd52af9bbaf0ca6be59a2aae079600077 /libavformat/anm.c
parenta62fced394825101b202a8bc6055e4932b371089 (diff)
parenta4472ac01e86f9fae5adb9034f2777b86a9c5480 (diff)
downloadffmpeg-849f015406e77921a2adbe05e58b0e65cbf035c5.tar.gz
Merge commit 'a4472ac01e86f9fae5adb9034f2777b86a9c5480'
* commit 'a4472ac01e86f9fae5adb9034f2777b86a9c5480': Add informative messages to av_log_ask_for_sample calls lacking them anm: Get rid of some very silly goto statements Conflicts: libavformat/anm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/anm.c')
-rw-r--r--libavformat/anm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/anm.c b/libavformat/anm.c
index f93c57e08a..79d31c1671 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -134,9 +134,9 @@ static int read_header(AVFormatContext *s)
/* color cycling and palette data */
st->codec->extradata_size = 16*8 + 4*256;
st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!st->codec->extradata)
+ if (!st->codec->extradata) {
return AVERROR(ENOMEM);
-
+ }
ret = avio_read(pb, st->codec->extradata, st->codec->extradata_size);
if (ret < 0)
return ret;
@@ -155,14 +155,15 @@ static int read_header(AVFormatContext *s)
/* find page of first frame */
anm->page = find_record(anm, 0);
- if (anm->page < 0)
+ if (anm->page < 0) {
return anm->page;
+ }
anm->record = -1;
return 0;
invalid:
- av_log_ask_for_sample(s, NULL);
+ av_log_ask_for_sample(s, "Invalid header element encountered.\n");
return AVERROR_PATCHWELCOME;
}