}
#endif
-static int _get_first_good_video_frame(AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, int videoStream, AVFrame **pFrame, int cdis);
+static int _get_first_good_video_frame(AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, AVFrame **pFrame, int cdis);
static int __convert_vidio_codec_type(int AVVideoCodecID)
{
}
/* search & decode */
- ret = _get_first_good_video_frame(pFormatCtx, pVideoCodecCtx, formatContext->videoStreamId, &pFrame, formatContext->cdis);
+ ret = _get_first_good_video_frame(pFormatCtx, pVideoCodecCtx, &pFrame, formatContext->cdis);
if (ret != MMFILE_FORMAT_SUCCESS) {
debug_error(DEBUG, "error: get key frame");
ret = MMFILE_FORMAT_FAIL;
}
#endif
-static int _get_first_good_video_frame(AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, int videoStream, AVFrame **pFrame, int cdis)
+static int _get_first_good_video_frame(AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, AVFrame **pFrame, int cdis)
{
#define _RETRY_SEARCH_LIMIT 250
#define _KEY_SEARCH_LIMIT (_RETRY_SEARCH_LIMIT*2) /*2 = 1 read. some frame need to read one more*/
#define _KEY_SEARCH_LIMIT_CDIS (_RETRY_SEARCH_LIMIT*2) /*2 = 1 read. some frame need to read one more*/
#define _FRAME_SEARCH_LIMIT_CDIS 10
- /* AVStream *st = NULL; */
AVPacket *pkt = NULL;
AVFrame *frame = NULL;
AVFrame *tmp_frame = NULL;
AVFrame *first_frame = NULL;
- /* long long timestamp; */
- /*int stream_id = videoStream;*/
int ret;
int found = 0;
int i, v, len;