]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/flvdec.c
avformat/http: escape unsafe URL path in HTTP request
[ffmpeg] / libavformat / flvdec.c
index b531a39adc80da8051d2c87f5853e109f60a32a2..7c3e5b06c6feb7087689744faa3320863c74119a 100644 (file)
@@ -32,7 +32,6 @@
 #include "libavutil/mathematics.h"
 #include "libavutil/time_internal.h"
 #include "libavcodec/bytestream.h"
-#include "libavcodec/mpeg4audio.h"
 #include "avformat.h"
 #include "internal.h"
 #include "avio_internal.h"
@@ -796,12 +795,12 @@ static int flv_read_close(AVFormatContext *s)
 
 static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size)
 {
+    int ret;
     if (!size)
         return 0;
 
-    av_freep(&st->codecpar->extradata);
-    if (ff_get_extradata(s, st->codecpar, s->pb, size) < 0)
-        return AVERROR(ENOMEM);
+    if ((ret = ff_get_extradata(s, st->codecpar, s->pb, size)) < 0)
+        return ret;
     st->internal->need_context_update = 1;
     return 0;
 }
@@ -1265,22 +1264,6 @@ retry_duration:
             if (st->codecpar->codec_id == AV_CODEC_ID_AAC && t && !strcmp(t->value, "Omnia A/XE"))
                 st->codecpar->extradata_size = 2;
 
-            if (st->codecpar->codec_id == AV_CODEC_ID_AAC && 0) {
-                MPEG4AudioConfig cfg;
-
-                if (avpriv_mpeg4audio_get_config(&cfg, st->codecpar->extradata,
-                                                 st->codecpar->extradata_size * 8, 1) >= 0) {
-                st->codecpar->channels       = cfg.channels;
-                st->codecpar->channel_layout = 0;
-                if (cfg.ext_sample_rate)
-                    st->codecpar->sample_rate = cfg.ext_sample_rate;
-                else
-                    st->codecpar->sample_rate = cfg.sample_rate;
-                av_log(s, AV_LOG_TRACE, "mp4a config channels %d sample rate %d\n",
-                        st->codecpar->channels, st->codecpar->sample_rate);
-                }
-            }
-
             ret = FFERROR_REDO;
             goto leave;
         }