mirror of https://git.ffmpeg.org/ffmpeg.git
fftools/ffprobe: Remove redundant checks
A decoder is only opened if there is a decoder for the codec, so every AVCodecContext here has AVCodecContext.codec set. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
26cce232d7
commit
047a4e580e
|
@ -2561,7 +2561,7 @@ static av_always_inline int process_frame(WriterContext *w,
|
||||||
int ret = 0, got_frame = 0;
|
int ret = 0, got_frame = 0;
|
||||||
|
|
||||||
clear_log(1);
|
clear_log(1);
|
||||||
if (dec_ctx && dec_ctx->codec) {
|
if (dec_ctx) {
|
||||||
switch (par->codec_type) {
|
switch (par->codec_type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
|
@ -2901,7 +2901,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dec_ctx && dec_ctx->codec && dec_ctx->codec->priv_class && show_private_data) {
|
if (dec_ctx && dec_ctx->codec->priv_class && show_private_data) {
|
||||||
const AVOption *opt = NULL;
|
const AVOption *opt = NULL;
|
||||||
while (opt = av_opt_next(dec_ctx->priv_data,opt)) {
|
while (opt = av_opt_next(dec_ctx->priv_data,opt)) {
|
||||||
uint8_t *str;
|
uint8_t *str;
|
||||||
|
|
Loading…
Reference in New Issue