Skip to content
Permalink
Browse files

libavcodec: mpeg12dec: fix wrong dependency check

not fully confirmed/tested.
  • Loading branch information
0p1pp1 authored and 0p1pp1 committed Sep 1, 2019
1 parent a63ec19 commit b049b2f232a15d92563ceb9f3bf7f36a8302e21e
Showing with 2 additions and 2 deletions.
  1. +2 −2 libavcodec/mpeg12dec.c
@@ -2668,7 +2668,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
return AVERROR_INVALIDDATA;
}

if (!s2->last_picture_ptr) {
if (!s2->next_picture_ptr) {
/* Skip B-frames if we do not have reference frames and
* GOP is not closed. */
if (s2->pict_type == AV_PICTURE_TYPE_B) {
@@ -2682,7 +2682,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
}
if (s2->pict_type == AV_PICTURE_TYPE_I || (s2->avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL))
s->sync = 1;
if (!s2->next_picture_ptr) {
if (!s2->last_picture_ptr) {
/* Skip P-frames if we do not have a reference frame or
* we have an invalid header. */
if (s2->pict_type == AV_PICTURE_TYPE_P && !s->sync) {

0 comments on commit b049b2f

Please sign in to comment.