Updates for ffmpeg/libav support
This commit is contained in:
parent
72a7266daf
commit
c9769db9a2
2 changed files with 5 additions and 5 deletions
|
@ -161,7 +161,7 @@ int av_vid_init(char *file)
|
|||
|
||||
videoStream=-1;
|
||||
for (i=0; i<pFormatCtx->nb_streams; i++) {
|
||||
if (pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) {
|
||||
if (pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
|
||||
videoStream=i;
|
||||
break;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ int av_aud_init(char *file)
|
|||
|
||||
audioStream=-1;
|
||||
for (i=0; i<pAFormatCtx->nb_streams; i++)
|
||||
if (pAFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_AUDIO)
|
||||
if (pAFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO)
|
||||
{
|
||||
audioStream=i;
|
||||
break;
|
||||
|
|
|
@ -379,11 +379,11 @@ int decoder_init(PlayerCtx *ctx, const char *file)
|
|||
|
||||
for (i = 0; i < ctx->fmt_ctx->nb_streams; i++) {
|
||||
switch (ctx->fmt_ctx->streams[i]->codec->codec_type) {
|
||||
case CODEC_TYPE_VIDEO:
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
if (ctx->video_idx == -1)
|
||||
ctx->video_idx = i;
|
||||
break;
|
||||
case CODEC_TYPE_AUDIO:
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
if (ctx->audio_idx == -1)
|
||||
ctx->audio_idx = i;
|
||||
break;
|
||||
|
@ -959,4 +959,4 @@ void playvid_seek(PlayerCtx *ctx, double pos)
|
|||
ctx->cur_seekid++;
|
||||
pthread_cond_signal(&ctx->seek_cond);
|
||||
pthread_mutex_unlock(&ctx->seek_mutex);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue