[FFmpeg-cvslog] avformat/flvdec: Print terminator value found if it differs from AMF_END_OF_OBJECT in AMF_DATA_TYPE_MIXEDARRAY
Michael Niedermayer
git at videolan.org
Sun Sep 13 14:24:23 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Sep 13 12:33:49 2015 +0200| [6bed88ac78c292edb4714e035957d76b3e4cbff7] | committer: Michael Niedermayer
avformat/flvdec: Print terminator value found if it differs from AMF_END_OF_OBJECT in AMF_DATA_TYPE_MIXEDARRAY
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6bed88ac78c292edb4714e035957d76b3e4cbff7
---
libavformat/flvdec.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 36a1797..519c8d9 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -433,6 +433,8 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
case AMF_DATA_TYPE_UNSUPPORTED:
break; // these take up no additional space
case AMF_DATA_TYPE_MIXEDARRAY:
+ {
+ unsigned v;
avio_skip(ioc, 4); // skip 32-bit max array index
while (avio_tell(ioc) < max_pos - 2 &&
amf_get_string(ioc, str_val, sizeof(str_val)) > 0)
@@ -441,11 +443,13 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
if (amf_parse_object(s, astream, vstream, str_val, max_pos,
depth + 1) < 0)
return -1;
- if (avio_r8(ioc) != AMF_END_OF_OBJECT) {
- av_log(s, AV_LOG_ERROR, "Missing AMF_END_OF_OBJECT in AMF_DATA_TYPE_MIXEDARRAY\n");
+ v = avio_r8(ioc);
+ if (v != AMF_END_OF_OBJECT) {
+ av_log(s, AV_LOG_ERROR, "Missing AMF_END_OF_OBJECT in AMF_DATA_TYPE_MIXEDARRAY, found %d\n", v);
return -1;
}
break;
+ }
case AMF_DATA_TYPE_ARRAY:
{
unsigned int arraylen, i;
More information about the ffmpeg-cvslog
mailing list