diff mbox

[FFmpeg-devel,2/3] lavc/h264_slice: drop redundant current_slice reset

Message ID 20170113114007.15690-2-u@pkh.me
State Accepted
Commit bd520e85690183f73bdcd298100b22d58d6b205d
Headers show

Commit Message

Clément Bœsch Jan. 13, 2017, 11:40 a.m. UTC
From: Clément Bœsch <cboesch@gopro.com>

It is done unconditionally in ff_h264_field_end()
---
 libavcodec/h264_slice.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael Niedermayer Jan. 13, 2017, 4:14 p.m. UTC | #1
On Fri, Jan 13, 2017 at 12:40:06PM +0100, Clément Bœsch wrote:
> From: Clément Bœsch <cboesch@gopro.com>
> 
> It is done unconditionally in ff_h264_field_end()
> ---
>  libavcodec/h264_slice.c | 2 --
>  1 file changed, 2 deletions(-)

ok

thx

[...]
Clément Bœsch Jan. 16, 2017, 9:45 a.m. UTC | #2
On Fri, Jan 13, 2017 at 05:14:48PM +0100, Michael Niedermayer wrote:
> On Fri, Jan 13, 2017 at 12:40:06PM +0100, Clément Bœsch wrote:
> > From: Clément Bœsch <cboesch@gopro.com>
> > 
> > It is done unconditionally in ff_h264_field_end()
> > ---
> >  libavcodec/h264_slice.c | 2 --
> >  1 file changed, 2 deletions(-)
> 
> ok
> 
> thx
> 

applied
diff mbox

Patch

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 9a334a97cb..2dc98c109c 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1797,13 +1797,11 @@  int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
 
             if (h->cur_pic_ptr && FIELD_PICTURE(h) && h->first_field) {
                 ret = ff_h264_field_end(h, h->slice_ctx, 1);
-                h->current_slice = 0;
                 if (ret < 0)
                     return ret;
             } else if (h->cur_pic_ptr && !FIELD_PICTURE(h) && !h->first_field && h->nal_unit_type  == H264_NAL_IDR_SLICE) {
                 av_log(h, AV_LOG_WARNING, "Broken frame packetizing\n");
                 ret = ff_h264_field_end(h, h->slice_ctx, 1);
-                h->current_slice = 0;
                 ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX, 0);
                 ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX, 1);
                 h->cur_pic_ptr = NULL;