diff mbox

[FFmpeg-devel] avformat/flvdec: delete unused code

Message ID 1565679960-120520-1-git-send-email-leozhang@qiyi.com
State Superseded
Headers show

Commit Message

leozhang Aug. 13, 2019, 7:06 a.m. UTC
Signed-off-by: leozhang <leozhang@qiyi.com>
---
 libavformat/flvdec.c | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

Carl Eugen Hoyos Aug. 13, 2019, 9:37 a.m. UTC | #1
Am Di., 13. Aug. 2019 um 09:06 Uhr schrieb leozhang <leozhang@qiyi.com>:
>
> Signed-off-by: leozhang <leozhang@qiyi.com>
> ---
>  libavformat/flvdec.c | 16 ----------------
>  1 file changed, 16 deletions(-)
>
> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> index b531a39..4e8faed 100644
> --- a/libavformat/flvdec.c
> +++ b/libavformat/flvdec.c
> @@ -1265,22 +1265,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;
>          }

You forgot to remove '#include "libavcodec/mpeg4audio.h"'.

In case anybody is interested, here is the original thread:
https://ffmpeg.org/pipermail/ffmpeg-devel/2009-February/065799.html

Carl Eugen
leozhang Aug. 13, 2019, 10:47 a.m. UTC | #2
Carl Eugen Hoyos <ceffmpeg@gmail.com> 于2019年8月13日周二 下午5:37写道:
>
> Am Di., 13. Aug. 2019 um 09:06 Uhr schrieb leozhang <leozhang@qiyi.com>:
> >
> > Signed-off-by: leozhang <leozhang@qiyi.com>
> > ---
> >  libavformat/flvdec.c | 16 ----------------
> >  1 file changed, 16 deletions(-)
> >
> > diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> > index b531a39..4e8faed 100644
> > --- a/libavformat/flvdec.c
> > +++ b/libavformat/flvdec.c
> > @@ -1265,22 +1265,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;
> >          }
>
> You forgot to remove '#include "libavcodec/mpeg4audio.h"'.
Thanks. Will send a new patch which removes this header.
>
> In case anybody is interested, here is the original thread:
> https://ffmpeg.org/pipermail/ffmpeg-devel/2009-February/065799.html
>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index b531a39..4e8faed 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -1265,22 +1265,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;
         }