Commit 6fc57856 authored by Tristan Matthews's avatar Tristan Matthews Committed by Ilkka Ollakka

avcodec: reuse DEFAULT_ALIGN

Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
parent 64d26fe4
...@@ -1163,12 +1163,6 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int ...@@ -1163,12 +1163,6 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int
//How much we need to copy from new packet //How much we need to copy from new packet
const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes; const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
#if LIBAVUTIL_VERSION_CHECK( 51,27,2,46,100 )
const int align = 0;
#else
const int align = 1;
#endif
avcodec_get_frame_defaults( p_sys->frame ); avcodec_get_frame_defaults( p_sys->frame );
p_sys->frame->format = p_sys->p_context->sample_fmt; p_sys->frame->format = p_sys->p_context->sample_fmt;
p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay; p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
...@@ -1208,7 +1202,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int ...@@ -1208,7 +1202,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int
if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels, if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels,
p_sys->p_context->sample_fmt, p_sys->b_planar ? p_sys->p_interleave_buf : p_sys->p_buffer, p_sys->p_context->sample_fmt, p_sys->b_planar ? p_sys->p_interleave_buf : p_sys->p_buffer,
p_sys->i_buffer_out, p_sys->i_buffer_out,
align) < 0 ) DEFAULT_ALIGN) < 0 )
{ {
msg_Err( p_enc, "filling error on fillup" ); msg_Err( p_enc, "filling error on fillup" );
p_sys->frame->nb_samples = 0; p_sys->frame->nb_samples = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment