Skip to content

Commit fe28150

Browse files
committed
Fix webm packet reading, to correctly retry packets. Sometimes we must send more packets before receiving decoded data, and sometimes we need to receive more decoded data before sending more packets. We had a logic error in this code.
1 parent e72168f commit fe28150

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FFmpegReader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ bool FFmpegReader::GetAVFrame() {
11501150
#if IS_FFMPEG_3_2
11511151
int send_packet_err = 0;
11521152
int64_t send_packet_pts = 0;
1153-
if ((packet && packet->stream_index == videoStream && !hold_packet) || !packet) {
1153+
if ((packet && packet->stream_index == videoStream) || !packet) {
11541154
send_packet_err = avcodec_send_packet(pCodecCtx, packet);
11551155

11561156
if (packet && send_packet_err >= 0) {

0 commit comments

Comments
 (0)