ports/122922: [ patch ] ffmpeg text output is mangled
Dieter
freebsd at sopwith.solgatos.com
Sun Apr 20 03:30:01 UTC 2008
>Number: 122922
>Category: ports
>Synopsis: [ patch ] ffmpeg text output is mangled
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 20 03:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Dieter
>Release: 7.0 release amd64
>Organization:
>Environment:
>Description:
ffmpeg, as built from ports, has mangled text output.
Adding a newline makes it easier to read, and possible
to see where in the input file problems occured.
With the patch, you get output like this:
frame=14327 fps= 5 q=0.0 size= 1677656kB time=477.7 bitrate=28770.1kbits/s dup=107 drop=0
[mpeg2video @ 0x800ca7d60]MPEG motion vector out of boundary
frame=55812 fps= 16 q=0.0 size= 6538477kB time=1861.7 bitrate=28771.2kbits/s dup=107 drop=0
[mpeg2video @ 0x800ca7d60]MPEG motion vector out of boundary
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
===================================================================
RCS file: work/ffmpeg-2007-10-04/libavutil/RCS/log.c,v
retrieving revision 1.1
diff -u -r1.1 work/ffmpeg-2007-10-04/libavutil/log.c
--- work/ffmpeg-2007-10-04/libavutil/log.c 2008/04/19 16:32:48 1.1
+++ work/ffmpeg-2007-10-04/libavutil/log.c 2008/04/19 18:19:29
@@ -26,6 +26,8 @@
#include "avutil.h"
+int need_return = 0;
+
int av_log_level = AV_LOG_INFO;
void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
@@ -36,6 +38,7 @@
return;
#undef fprintf
if(print_prefix && avc) {
+ if (need_return) { fprintf(stderr, "\n"); need_return = 0; }
fprintf(stderr, "[%s @ %p]", avc->item_name(ptr), avc);
}
#define fprintf please_use_av_log
===================================================================
RCS file: work/ffmpeg-2007-10-04/RCS/ffmpeg.c,v
retrieving revision 1.1
diff -u -r1.1 work/ffmpeg-2007-10-04/ffmpeg.c
--- work/ffmpeg-2007-10-04/ffmpeg.c 2008/04/19 18:22:37 1.1
+++ work/ffmpeg-2007-10-04/ffmpeg.c 2008/04/19 18:24:46
@@ -887,6 +887,8 @@
}
}
+extern int need_return; /* global - for better debugging output */
+
static void print_report(AVFormatContext **output_files,
AVOutputStream **ost_table, int nb_ostreams,
int is_last_report)
@@ -988,8 +990,11 @@
(double)total_size / 1024, ti1, bitrate);
if (verbose > 1)
+ {
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " dup=%d drop=%d",
nb_frames_dup, nb_frames_drop);
+ need_return = 1;
+ }
if (verbose >= 0)
fprintf(stderr, "%s \r", buf);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list