MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / has_codec_parameters

Function has_codec_parameters

libavformat/utils.c:1991–2014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1989}
1990
1991static int has_codec_parameters(AVCodecContext *enc)
1992{
1993 int val;
1994 switch(enc->codec_type) {
1995 case AVMEDIA_TYPE_AUDIO:
1996 val = enc->sample_rate && enc->channels && enc->sample_fmt != SAMPLE_FMT_NONE;
1997 if(!enc->frame_size &&
1998 (enc->codec_id == CODEC_ID_VORBIS ||
1999 enc->codec_id == CODEC_ID_AAC ||
2000 enc->codec_id == CODEC_ID_MP1 ||
2001 enc->codec_id == CODEC_ID_MP2 ||
2002 enc->codec_id == CODEC_ID_MP3 ||
2003 enc->codec_id == CODEC_ID_SPEEX))
2004 return 0;
2005 break;
2006 case AVMEDIA_TYPE_VIDEO:
2007 val = enc->width && enc->pix_fmt != PIX_FMT_NONE;
2008 break;
2009 default:
2010 val = 1;
2011 break;
2012 }
2013 return enc->codec_id != CODEC_ID_NONE && val != 0;
2014}
2015
2016static int try_decode_frame(AVStream *st, AVPacket *avpkt)
2017{

Callers 2

try_decode_frameFunction · 0.85
av_find_stream_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected