[FFmpeg-trac] #6418(undetermined:open): ffmpeg QSV doesnt work with live streams
FFmpeg
trac at avcodec.org
Tue Aug 14 12:43:42 EEST 2018
#6418: ffmpeg QSV doesnt work with live streams
-------------------------------------+-------------------------------------
Reporter: rycius | Owner:
Type: defect | Status: open
Priority: important | Component:
Version: git-master | undetermined
Keywords: qsv | Resolution:
regression | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by lizhong1008):
Commit 559370f2c45110afd8308eec7194437736c323d4 should fix h264/h265
issue. But it doesn't fix mpeg2 and similar patch is needed.
Where I can download the mpeg2 file "tmp.ts" of comments 18?
commit 559370f2c45110afd8308eec7194437736c323d4
Author: Ruiling, Song <ruiling.song at intel.com>
Date: Wed Jan 24 10:14:51 2018 +0800
qsv: Skip the packet if decoding failure
MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.
Signed-off-by: Ruiling Song <ruiling.song at intel.com>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index 83880dc..78a7b61 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -153,8 +153,12 @@ static int qsv_decode_frame(AVCodecContext *avctx,
void *data,
}
ret = ff_qsv_process_data(avctx, &s->qsv, frame, got_frame,
&s->buffer_pkt);
- if (ret < 0)
+ if (ret < 0){
+ /* Drop buffer_pkt when failed to decode the packet.
Otherwise,
+ the decoder will keep decoding the failure packet. */
+ av_packet_unref(&s->buffer_pkt);
return ret;
+ }
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6418#comment:19>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list