OLD | NEW |
(Empty) | |
| 1 diff -wurp -N orig/libavcodec/pthread.c patched-ffmpeg/libavcodec/pthread.c |
| 2 --- orig/libavcodec/pthread.c 2011-11-09 10:48:42.944816193 -0800 |
| 3 +++ patched-ffmpeg/libavcodec/pthread.c 2011-11-09 10:48:53.014862587 -0800 |
| 4 @@ -485,6 +485,7 @@ static int submit_packet(PerThreadContex |
| 5 } |
| 6 |
| 7 fctx->prev_thread = p; |
| 8 + fctx->next_decoding++; |
| 9 |
| 10 return 0; |
| 11 } |
| 12 @@ -507,8 +508,6 @@ int ff_thread_decode_frame(AVCodecContex |
| 13 err = submit_packet(p, avpkt); |
| 14 if (err) return err; |
| 15 |
| 16 - fctx->next_decoding++; |
| 17 - |
| 18 /* |
| 19 * If we're still receiving the initial packets, don't return a frame. |
| 20 */ |
| 21 diff -wurp -N orig/libavcodec/vp8.c patched-ffmpeg/libavcodec/vp8.c |
| 22 --- orig/libavcodec/vp8.c 2011-11-09 10:48:43.154817161 -0800 |
| 23 +++ patched-ffmpeg/libavcodec/vp8.c 2011-11-09 10:48:53.014862587 -0800 |
| 24 @@ -50,8 +50,7 @@ static int vp8_alloc_frame(VP8Context *s |
| 25 int ret; |
| 26 if ((ret = ff_thread_get_buffer(s->avctx, f)) < 0) |
| 27 return ret; |
| 28 - if (s->num_maps_to_be_freed) { |
| 29 - assert(!s->maps_are_invalid); |
| 30 + if (s->num_maps_to_be_freed && !s->maps_are_invalid) { |
| 31 f->ref_index[0] = s->segmentation_maps[--s->num_maps_to_be_freed]; |
| 32 } else if (!(f->ref_index[0] = av_mallocz(s->mb_width * s->mb_height))) { |
| 33 ff_thread_release_buffer(s->avctx, f); |
| 34 @@ -1565,13 +1564,15 @@ static int vp8_decode_frame(AVCodecConte |
| 35 VP8Context *s = avctx->priv_data; |
| 36 int ret, mb_x, mb_y, i, y, referenced; |
| 37 enum AVDiscard skip_thresh; |
| 38 - AVFrame *av_uninit(curframe), *prev_frame = s->framep[VP56_FRAME_CURRENT]; |
| 39 + AVFrame *av_uninit(curframe), *prev_frame; |
| 40 |
| 41 release_queued_segmaps(s, 0); |
| 42 |
| 43 if ((ret = decode_frame_header(s, avpkt->data, avpkt->size)) < 0) |
| 44 return ret; |
| 45 |
| 46 + prev_frame = s->framep[VP56_FRAME_CURRENT]; |
| 47 + |
| 48 referenced = s->update_last || s->update_golden == VP56_FRAME_CURRENT |
| 49 || s->update_altref == VP56_FRAME_CURRENT; |
| 50 |
OLD | NEW |