From 885427c569ba6e40cde0b2e46f79b21120213b92 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Tue, 30 Jun 2009 02:01:34 +0000 Subject: [PATCH] * If we can't get a video stream bitrate, leave it NULL instead of calling it 0. --- metadata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metadata.c b/metadata.c index 901b6d3..0e53772 100644 --- a/metadata.c +++ b/metadata.c @@ -650,7 +650,8 @@ GetVideoMetadata(const char * path, char * name) { DPRINTF(E_DEBUG, L_METADATA, "Container: '%s' [%s]\n", ctx->iformat->name, basename(path)); asprintf(&m.resolution, "%dx%d", ctx->streams[video_stream]->codec->width, ctx->streams[video_stream]->codec->height); - asprintf(&m.bitrate, "%u", ctx->bit_rate / 8); + if( ctx->bit_rate > 8 ) + asprintf(&m.bitrate, "%u", ctx->bit_rate / 8); if( ctx->duration > 0 ) { duration = (int)(ctx->duration / AV_TIME_BASE); hours = (int)(duration / 3600);