diff --git a/image_utils.c b/image_utils.c index 79eb4f8..de1b801 100644 --- a/image_utils.c +++ b/image_utils.c @@ -235,7 +235,7 @@ image_get_jpeg_resolution(const char * path, int * width, int * height) { FILE *img; unsigned char buf[8]; - u_int16_t offset; + u_int16_t offset, h, w; int ret = 1; img = fopen(path, "r"); @@ -263,10 +263,10 @@ image_get_jpeg_resolution(const char * path, int * width, int * height) fread(&buf, 7, 1, img); *width = 0; *height = 0; - memcpy(height, buf+3, 2); - *height = SWAP16(*height); - memcpy(width, buf+5, 2); - *width = SWAP16(*width); + memcpy(&h, buf+3, 2); + *height = SWAP16(h); + memcpy(&w, buf+5, 2); + *width = SWAP16(w); ret = 0; break; } diff --git a/metadata.c b/metadata.c index 5c48209..f4c69a3 100644 --- a/metadata.c +++ b/metadata.c @@ -968,7 +968,7 @@ GetVideoMetadata(const char * path, char * name) else if( strcmp(ctx->iformat->name, "flv") == 0 ) asprintf(&m.mime, "video/x-flv"); else - DPRINTF(E_WARN, L_METADATA, "Unhandled format: %s\n", ctx->iformat->name); + DPRINTF(E_WARN, L_METADATA, "%s: Unhandled format: %s\n", path, ctx->iformat->name); } av_close_input_file(ctx); #ifdef TIVO_SUPPORT