diff mbox

[FFmpeg-devel,V1,2/5] lavf/nutdec: add logging context to log

Message ID 1569673437-22200-2-git-send-email-mypopydev@gmail.com
State Accepted
Commit 12e6057fb005d91b91d706b531f744737208d527
Headers show

Commit Message

Jun Zhao Sept. 28, 2019, 12:23 p.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

Add logging context to log, it's will help debuging.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavformat/nutdec.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Paul B Mahol Sept. 28, 2019, 12:26 p.m. UTC | #1
lgtm

On 9/28/19, Jun Zhao <mypopydev@gmail.com> wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
>
> Add logging context to log, it's will help debuging.
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavformat/nutdec.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
> index 979cb9a..2b5adcb 100644
> --- a/libavformat/nutdec.c
> +++ b/libavformat/nutdec.c
> @@ -1275,13 +1275,13 @@ static int read_seek(AVFormatContext *s, int
> stream_index,
>          av_assert0(sp);
>          pos2 = sp->back_ptr - 15;
>      }
> -    av_log(NULL, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2);
> +    av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2);
>      pos = find_startcode(s->pb, SYNCPOINT_STARTCODE, pos2);
>      avio_seek(s->pb, pos, SEEK_SET);
>      nut->last_syncpoint_pos = pos;
> -    av_log(NULL, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos);
> +    av_log(s, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos);
>      if (pos2 > pos || pos2 + 15 < pos)
> -        av_log(NULL, AV_LOG_ERROR, "no syncpoint at backptr pos\n");
> +        av_log(s, AV_LOG_ERROR, "no syncpoint at backptr pos\n");
>      for (i = 0; i < s->nb_streams; i++)
>          nut->stream[i].skip_until_key_frame = 1;
>
> --
> 1.7.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 979cb9a..2b5adcb 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -1275,13 +1275,13 @@  static int read_seek(AVFormatContext *s, int stream_index,
         av_assert0(sp);
         pos2 = sp->back_ptr - 15;
     }
-    av_log(NULL, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2);
+    av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2);
     pos = find_startcode(s->pb, SYNCPOINT_STARTCODE, pos2);
     avio_seek(s->pb, pos, SEEK_SET);
     nut->last_syncpoint_pos = pos;
-    av_log(NULL, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos);
+    av_log(s, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos);
     if (pos2 > pos || pos2 + 15 < pos)
-        av_log(NULL, AV_LOG_ERROR, "no syncpoint at backptr pos\n");
+        av_log(s, AV_LOG_ERROR, "no syncpoint at backptr pos\n");
     for (i = 0; i < s->nb_streams; i++)
         nut->stream[i].skip_until_key_frame = 1;