avcodec/wavpack: Fix runtime error: shift exponent 137 is too large for 32-bit type...
[ffmpeg.git] / ffmpeg.c
index db7e8cd..f9fadbd 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2437,6 +2437,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int eo
 
     best_effort_timestamp= av_frame_get_best_effort_timestamp(decoded_frame);
 
+    if (ist->framerate.num)
+        best_effort_timestamp = ist->cfr_next_pts++;
+
     if (eof && best_effort_timestamp == AV_NOPTS_VALUE && ist->nb_dts_buffer > 0) {
         best_effort_timestamp = ist->dts_buffer[0];
 
@@ -2652,12 +2655,6 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
                    ist->file_index, ist->st->index, av_err2str(ret));
             if (exit_on_error)
                 exit_program(1);
-            // Decoding might not terminate if we're draining the decoder, and
-            // the decoder keeps returning an error.
-            // This should probably be considered a libavcodec issue.
-            // Sample: fate-vsynth1-dnxhd-720p-hr-lb
-            if (!pkt)
-                eof_reached = 1;
             break;
         }