Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix build with ffmpeg snapshots. #5733

Merged
merged 1 commit into from
Nov 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions record/drivers/record_ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static bool ffmpeg_init_audio(ffmpeg_t *handle)

if (params->audio_qscale)
{
audio->codec->flags |= CODEC_FLAG_QSCALE;
audio->codec->flags |= AV_CODEC_FLAG_QSCALE;
audio->codec->global_quality = params->audio_global_quality;
}
else if (params->audio_bit_rate)
Expand All @@ -358,7 +358,7 @@ static bool ffmpeg_init_audio(ffmpeg_t *handle)
audio->codec->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;

if (handle->muxer.ctx->oformat->flags & AVFMT_GLOBALHEADER)
audio->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
audio->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

if (avcodec_open2(audio->codec, codec, params->audio_opts ? &params->audio_opts : NULL) != 0)
return false;
Expand All @@ -378,7 +378,7 @@ static bool ffmpeg_init_audio(ffmpeg_t *handle)
if (!audio->buffer)
return false;

audio->outbuf_size = FF_MIN_BUFFER_SIZE;
audio->outbuf_size = AV_INPUT_BUFFER_MIN_SIZE;
audio->outbuf = (uint8_t*)av_malloc(audio->outbuf_size);
if (!audio->outbuf)
return false;
Expand Down Expand Up @@ -490,14 +490,14 @@ static bool ffmpeg_init_video(ffmpeg_t *handle)

if (params->video_qscale)
{
video->codec->flags |= CODEC_FLAG_QSCALE;
video->codec->flags |= AV_CODEC_FLAG_QSCALE;
video->codec->global_quality = params->video_global_quality;
}
else if (params->video_bit_rate)
video->codec->bit_rate = params->video_bit_rate;

if (handle->muxer.ctx->oformat->flags & AVFMT_GLOBALHEADER)
video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
video->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

if (avcodec_open2(video->codec, codec, params->video_opts ?
&params->video_opts : NULL) != 0)
Expand Down