[vlc-commits] Revert "codec: avcodec: drop frame internally"
Francois Cartegnie
git at videolan.org
Mon Aug 6 11:24:09 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 6 11:20:35 2018 +0200| [a67ba8ca61ee5789e0b32628a79dfa58a07ee4ad] | committer: Francois Cartegnie
Revert "codec: avcodec: drop frame internally"
Supposely freeing buffers internally faster for next
frames, it worsened the aync output/frame drop algorithm
since there's no signal from avcodec of dropped frame.
This reverts commit 3f5daf4d2f5501a5e8868bf2dbfccbe615cfdf5a.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a67ba8ca61ee5789e0b32628a79dfa58a07ee4ad
---
modules/codec/avcodec/video.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 3c2b3adb26..ce64a9b0cc 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1087,11 +1087,6 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_block->i_dts = VLC_TICK_INVALID;
}
-#if LIBAVCODEC_VERSION_CHECK( 57, 0, 0xFFFFFFFFU, 64, 101 )
- if( !b_need_output_picture )
- pkt.flags |= AV_PKT_FLAG_DISCARD;
-#endif
-
int ret = avcodec_send_packet(p_context, &pkt);
if( ret != 0 && ret != AVERROR(EAGAIN) )
{
@@ -1181,7 +1176,8 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
update_late_frame_count( p_dec, p_block, vlc_tick_now(), i_pts, frame->reordered_opaque);
- if( ( !p_sys->p_va && !frame->linesize[0] ) ||
+ if( !p_frame_info->b_display ||
+ ( !p_sys->p_va && !frame->linesize[0] ) ||
( p_dec->b_frame_drop_allowed && (frame->flags & AV_FRAME_FLAG_CORRUPT) &&
!p_sys->b_show_corrupted ) )
{
@@ -1189,14 +1185,6 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
continue;
}
-#if !LIBAVCODEC_VERSION_CHECK( 57, 0, 0xFFFFFFFFU, 64, 101 )
- if( !p_frame_info->b_display )
- {
- av_frame_free(&frame);
- continue;
- }
-#endif
-
if( p_context->pix_fmt == AV_PIX_FMT_PAL8
&& !p_dec->fmt_out.video.p_palette )
{
More information about the vlc-commits
mailing list