* If we can't get a video stream bitrate, leave it NULL instead of calling it 0.
This commit is contained in:
parent
6e9fdd9a94
commit
885427c569
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user