[FFmpeg-devel,07/15] avformat/matroskaenc: Improve log message

Submitted by Oliver Collyer via ffmpeg-devel on April 2, 2019, 1:32 p.m.

Details

Message ID 20190402133305.3328-8-andreas.rheinhardt@googlemail.com
State Accepted
Commit 924424d86781a5cfa4b59910f5f305e5ac348b4e
Headers show

Commit Message

Oliver Collyer via ffmpeg-devel April 2, 2019, 1:32 p.m.
Since 4e3bdf729a80f868b014ceb02901d87198b545a5 there is no reason any
more to treat the seekable and non-seekable cases separate with regards
to the log message for a new cluster. This effectively reverts
d41aeea8a64bab5d7aacd602f7214f95baad109f.

Also improved the log message: "pts 80dts 0" -> "pts 80, dts 0".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
---
 libavformat/matroskaenc.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 220d090a48..06e9081638 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2263,15 +2263,10 @@  static void mkv_start_new_cluster(AVFormatContext *s, AVPacket *pkt)
 
     end_ebml_master_crc32(s->pb, &mkv->dyn_bc, mkv, mkv->cluster);
     mkv->cluster_pos = -1;
-    if (s->pb->seekable & AVIO_SEEKABLE_NORMAL)
         av_log(s, AV_LOG_DEBUG,
                "Starting new cluster at offset %" PRIu64 " bytes, "
-               "pts %" PRIu64 "dts %" PRIu64 "\n",
+               "pts %" PRIu64 ", dts %" PRIu64 "\n",
                avio_tell(s->pb), pkt->pts, pkt->dts);
-    else
-        av_log(s, AV_LOG_DEBUG, "Starting new cluster, "
-               "pts %" PRIu64 "dts %" PRIu64 "\n",
-               pkt->pts, pkt->dts);
     avio_flush(s->pb);
 }
 
@@ -2548,12 +2543,9 @@  static int mkv_write_flush_packet(AVFormatContext *s, AVPacket *pkt)
         if (mkv->cluster_pos != -1) {
             end_ebml_master_crc32(s->pb, &mkv->dyn_bc, mkv, mkv->cluster);
             mkv->cluster_pos = -1;
-            if (s->pb->seekable & AVIO_SEEKABLE_NORMAL)
                 av_log(s, AV_LOG_DEBUG,
                        "Flushing cluster at offset %" PRIu64 " bytes\n",
                        avio_tell(s->pb));
-            else
-                av_log(s, AV_LOG_DEBUG, "Flushing cluster\n");
             avio_flush(s->pb);
         }
         return 1;