Obsolete since at least 74d623914f02aa79447df43a742efd0929dded04.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -325,18 +325,12 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 324 unmodified lines | |||
| 325 | ff_mpeg_unref_picture(&s->last_picture); | 325 | ff_mpeg_unref_picture(&s->last_picture); |
| 326 | ff_mpeg_unref_picture(&s->next_picture); | 326 | ff_mpeg_unref_picture(&s->next_picture); |
| 327 | 327 | ||
| 328 | if (s->current_picture_ptr && !s->current_picture_ptr->f->buf[0]) { | ||
| 329 | // we already have an unused image | ||
| 330 | // (maybe it was set before reading the header) | ||
| 331 | pic = s->current_picture_ptr; | ||
| 332 | } else { | ||
| 333 | idx = ff_find_unused_picture(s->avctx, s->picture, 0); | 328 | idx = ff_find_unused_picture(s->avctx, s->picture, 0); |
| 334 | if (idx < 0) { | 329 | if (idx < 0) { |
| 335 | av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n"); | 330 | av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n"); |
| 336 | return idx; | 331 | return idx; |
| 337 | } | 332 | } |
| 338 | pic = &s->picture[idx]; | 333 | pic = &s->picture[idx]; |
| 339 | } | ||
| 340 | 334 | ||
| 341 | pic->reference = 0; | 335 | pic->reference = 0; |
| 342 | if (!s->droppable) { | 336 | if (!s->droppable) { |