[FFmpeg-cvslog] avformat/format: move mime_type_opt declaration to where its used

Michael Niedermayer git at videolan.org
Fri Oct 10 03:14:38 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 10 03:08:11 2014 +0200| [e96fb980dcb658bb8e8a0dac2289a201b68f85b4] | committer: Michael Niedermayer

avformat/format: move mime_type_opt declaration to where its used

also remove a related dead store

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e96fb980dcb658bb8e8a0dac2289a201b68f85b4
---

 libavformat/format.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index 527299d..3b741ea 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -243,7 +243,6 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
     int ret = 0, probe_size, buf_offset = 0;
     int score = 0;
     int ret2;
-    uint8_t *mime_type_opt = NULL;
 
     if (!max_probe_size)
         max_probe_size = PROBE_BUF_MAX;
@@ -257,9 +256,9 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
         return AVERROR(EINVAL);
 
     if (pb->av_class) {
+        uint8_t *mime_type_opt = NULL;
         av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type_opt);
         pd.mime_type = (const char *)mime_type_opt;
-        mime_type_opt = NULL;
     }
 #if 0
     if (!*fmt && pb->av_class && av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type) >= 0 && mime_type) {



More information about the ffmpeg-cvslog mailing list