---
 libavcodec/h264.c |   10 +++++-----
 mt-work/todo.txt  |    1 -
 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 0ab49c3..fb796dd 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2400,7 +2400,7 @@ static int decode_update_context(AVCodecContext *dst, AVCodecContext *src){
     //FIXME these can(?) only change on IDR, so we only need to copy them then
     copy_parameter_set((void**)h->sps_buffers, (void**)h1->sps_buffers, MAX_SPS_COUNT, sizeof(SPS));
     h->sps = h1->sps;
-    copy_parameter_set((void**)h->pps_buffers, (void**)h1->pps_buffers, MAX_PPS_COUNT, sizeof(SPS));
+    copy_parameter_set((void**)h->pps_buffers, (void**)h1->pps_buffers, MAX_PPS_COUNT, sizeof(PPS));
     h->pps = h1->pps;
     h->last_slice_type = h1->last_slice_type;
     h->is_avc          = h1->is_avc;
@@ -2415,13 +2415,13 @@ static int decode_update_context(AVCodecContext *dst, AVCodecContext *src){
 
     if(!s->current_picture_ptr) return 0;
 
-    h->prev_frame_num_offset= h->frame_num_offset;
-    h->prev_frame_num= h->frame_num;
     if(!s->dropable) {
+        execute_ref_pic_marking(h, h->mmco, h->mmco_index);
         h->prev_poc_msb= h->poc_msb;
         h->prev_poc_lsb= h->poc_lsb;
-        execute_ref_pic_marking(h, h->mmco, h->mmco_index);
     }
+    h->prev_frame_num_offset= h->frame_num_offset;
+    h->prev_frame_num= h->frame_num;
     if(h->next_output_pic) h->outputed_poc = h->next_output_pic->poc;
 
     return 0;
@@ -8154,7 +8154,7 @@ AVCodec h264_decoder = {
     NULL,
     decode_end,
     decode_frame,
-    /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY,
+    /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_FRAME_THREADS,
     .flush= flush_dpb,
     .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
     .update_context = ONLY_IF_THREADS_ENABLED(decode_update_context)
diff --git a/mt-work/todo.txt b/mt-work/todo.txt
index 35cccb0..3c895e4 100644
--- a/mt-work/todo.txt
+++ b/mt-work/todo.txt
@@ -1,7 +1,6 @@
 Todo
 - Document new API functions
 - Maybe write a guide to converting codecs, if the API documentation itself isn't enough
-- Sync with mainline, especially h264 changes
 - Don't use the user's AVCodecContext for the first decoding thread, since it will read from it while user code is running and cause a race condition. This is easier than forbidding reading/writing to avctx after calling predecode_done.
 - Files with packed B-frames don't decode some frames properly in mplayer, possibly because of the above.
 - Packed B-frames are not parallelized
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to