summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-10 13:30:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-10 13:40:20 +0100
commit0fadbd3623cf9132832f48810c0edb93aa63f51b (patch)
treec4a00d54f3c80aead68689172c65e10ffec1583c /libavformat/flvdec.c
parenta2fa1889a69f55ad9f1971eb8ff9c638c0470ebf (diff)
avformat/flvdec: fix potential use of uninitialized variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 17d1313d60..c64b3a9d92 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -459,11 +459,11 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
}
if (key) {
+ acodec = astream ? astream->codec : NULL;
+ vcodec = vstream ? vstream->codec : NULL;
+
// stream info doesn't live any deeper than the first object
if (depth == 1) {
- acodec = astream ? astream->codec : NULL;
- vcodec = vstream ? vstream->codec : NULL;
-
if (amf_type == AMF_DATA_TYPE_NUMBER ||
amf_type == AMF_DATA_TYPE_BOOL) {
if (!strcmp(key, "duration"))