]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dump.c
avformat/rtpenc_mpegts: stop leaks
[ffmpeg] / libavformat / dump.c
index 6d29d85d1fba48368a7fb0dfe020c5b6d75efa42..62ef5e98524cfc7e161e9efee5096baca6a294cb 100644 (file)
@@ -408,7 +408,7 @@ static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd)
            dovi->dv_bl_signal_compatibility_id);
 }
 
-static void dump_s12m_timecode(void *ctx, const AVPacketSideData *sd)
+static void dump_s12m_timecode(void *ctx, const AVStream *st, const AVPacketSideData *sd)
 {
     const uint32_t *tc = (const uint32_t *)sd->data;
 
@@ -419,7 +419,7 @@ static void dump_s12m_timecode(void *ctx, const AVPacketSideData *sd)
 
     for (int j = 1; j <= tc[0]; j++) {
         char tcbuf[AV_TIMECODE_STR_SIZE];
-        av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
+        av_timecode_make_smpte_tc_string2(tcbuf, st->avg_frame_rate, tc[j], 0, 0);
         av_log(ctx, AV_LOG_INFO, "timecode - %s%s", tcbuf, j != tc[0] ? ", " : "");
     }
 }
@@ -492,7 +492,7 @@ static void dump_sidedata(void *ctx, const AVStream *st, const char *indent)
             break;
         case AV_PKT_DATA_S12M_TIMECODE:
             av_log(ctx, AV_LOG_INFO, "SMPTE ST 12-1:2014: ");
-            dump_s12m_timecode(ctx, sd);
+            dump_s12m_timecode(ctx, st, sd);
             break;
         default:
             av_log(ctx, AV_LOG_INFO,
@@ -543,7 +543,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
     avcodec_string(buf, sizeof(buf), avctx, is_output);
     avcodec_free_context(&avctx);
 
-    av_log(NULL, AV_LOG_INFO, "    Stream #%d:%d", index, i);
+    av_log(NULL, AV_LOG_INFO, "  Stream #%d:%d", index, i);
 
     /* the pid is an important information, so we display it */
     /* XXX: add a generic system */
@@ -686,6 +686,8 @@ void av_dump_format(AVFormatContext *ic, int index,
         av_log(NULL, AV_LOG_INFO, "\n");
     }
 
+    if (ic->nb_chapters)
+        av_log(NULL, AV_LOG_INFO, "  Chapters:\n");
     for (i = 0; i < ic->nb_chapters; i++) {
         const AVChapter *ch = ic->chapters[i];
         av_log(NULL, AV_LOG_INFO, "    Chapter #%d:%d: ", index, i);
@@ -694,7 +696,7 @@ void av_dump_format(AVFormatContext *ic, int index,
         av_log(NULL, AV_LOG_INFO,
                "end %f\n", ch->end * av_q2d(ch->time_base));
 
-        dump_metadata(NULL, ch->metadata, "    ");
+        dump_metadata(NULL, ch->metadata, "      ");
     }
 
     if (ic->nb_programs) {