Lines 170-176
void decode_lavc(decode_t *decode)
Link Here
|
170 |
|
170 |
|
171 |
// Set these to the expected values so that ffmpeg's decoder can |
171 |
// Set these to the expected values so that ffmpeg's decoder can |
172 |
// properly detect interlaced input. |
172 |
// properly detect interlaced input. |
173 |
lavc_dec_context = avcodec_alloc_context(); |
173 |
lavc_dec_context = avcodec_alloc_context3(NULL); |
174 |
if (lavc_dec_context == NULL) { |
174 |
if (lavc_dec_context == NULL) { |
175 |
tc_log_error(__FILE__, "Could not allocate enough memory."); |
175 |
tc_log_error(__FILE__, "Could not allocate enough memory."); |
176 |
goto decoder_error; |
176 |
goto decoder_error; |
Lines 186-192
void decode_lavc(decode_t *decode)
Link Here
|
186 |
lavc_dec_context->error_concealment = 3; |
186 |
lavc_dec_context->error_concealment = 3; |
187 |
lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT; |
187 |
lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT; |
188 |
|
188 |
|
189 |
if (avcodec_open(lavc_dec_context, lavc_dec_codec) < 0) { |
189 |
if (avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL) < 0) { |
190 |
tc_log_error(__FILE__, "Could not initialize the '%s' codec.", |
190 |
tc_log_error(__FILE__, "Could not initialize the '%s' codec.", |
191 |
codec->name); |
191 |
codec->name); |
192 |
goto decoder_error; |
192 |
goto decoder_error; |