summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-01 19:14:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-01 20:19:09 +0100
commitefc4bfc195dab6efa77b444eac9313df4596a922 (patch)
tree1dd8f3b05995d8294dc779f3eb8b10d09d43b7e1 /libavformat/flvdec.c
parenteb767a276bfdb9a0493bdb0b38203638230b7ccb (diff)
avformat/flvdec: use named identifier instead of literal numbers as return values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index dc0edf20d5..c13c0e48a1 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -546,6 +546,9 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
return 0;
}
+#define TYPE_ONTEXTDATA 1
+#define TYPE_UNKNOWN 2
+
static int flv_read_metabody(AVFormatContext *s, int64_t next_pos)
{
AMFDataType type;
@@ -566,13 +569,13 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos)
type = avio_r8(ioc);
if (type != AMF_DATA_TYPE_STRING ||
amf_get_string(ioc, buffer, sizeof(buffer)) < 0)
- return 2;
+ return TYPE_UNKNOWN;
if (!strcmp(buffer, "onTextData"))
- return 1;
+ return TYPE_ONTEXTDATA;
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
// the lookup every time it is called.