Commit efc4bfc1 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/flvdec: use named identifier instead of literal numbers as return values

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eb767a27
...@@ -546,6 +546,9 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, ...@@ -546,6 +546,9 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
return 0; return 0;
} }
#define TYPE_ONTEXTDATA 1
#define TYPE_UNKNOWN 2
static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) static int flv_read_metabody(AVFormatContext *s, int64_t next_pos)
{ {
AMFDataType type; AMFDataType type;
...@@ -566,13 +569,13 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) ...@@ -566,13 +569,13 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos)
type = avio_r8(ioc); type = avio_r8(ioc);
if (type != AMF_DATA_TYPE_STRING || if (type != AMF_DATA_TYPE_STRING ||
amf_get_string(ioc, buffer, sizeof(buffer)) < 0) amf_get_string(ioc, buffer, sizeof(buffer)) < 0)
return 2; return TYPE_UNKNOWN;
if (!strcmp(buffer, "onTextData")) if (!strcmp(buffer, "onTextData"))
return 1; return TYPE_ONTEXTDATA;
if (strcmp(buffer, "onMetaData") && strcmp(buffer, "onCuePoint")) if (strcmp(buffer, "onMetaData") && strcmp(buffer, "onCuePoint"))
return 2; return TYPE_UNKNOWN;
// find the streams now so that amf_parse_object doesn't need to do // find the streams now so that amf_parse_object doesn't need to do
// the lookup every time it is called. // the lookup every time it is called.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment