David <[email protected]> added the comment:

I uploaded my sample to the upload.ffmpeg.org ftp server, under fpe-ffmpeg/.
I also have a patch that checks ist->st->codec->time_base.den so it doesn't
divide by zero.

(patcheck says "x==0 / x!=0 can be simplified to !x / x" but I followed in the
same style as the code that was there.)

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2443>
________________________________________________
Index: ffmpeg.c
===================================================================
--- ffmpeg.c	(revision 26076)
+++ ffmpeg.c	(working copy)
@@ -1554,7 +1554,7 @@
                         goto discard_packet;
                     }
                     ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.reordered_opaque, ist->pts);
-                    if (ist->st->codec->time_base.num != 0) {
+                    if (ist->st->codec->time_base.num != 0 && ist->st->codec->time_base.den != 0 ) {
                         int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
                         ist->next_pts += ((int64_t)AV_TIME_BASE *
                                           ist->st->codec->time_base.num * ticks) /

Reply via email to