]> git.sesse.net Git - ffmpeg/blobdiff - avprobe.c
lavf: Explicitly convert types at function pointer assignment
[ffmpeg] / avprobe.c
index c56ac27efaa9bb76dbfbac5d4ecf5b5eef7003fd..d969257824ecf17d840cbeda55cfdc3d00514a82 100644 (file)
--- a/avprobe.c
+++ b/avprobe.c
@@ -84,14 +84,14 @@ typedef enum {
     OBJECT
 } PrintElementType;
 
-typedef struct {
+typedef struct PrintElement {
     const char *name;
     PrintElementType type;
     int64_t index;
     int64_t nb_elems;
 } PrintElement;
 
-typedef struct {
+typedef struct PrintContext {
     PrintElement *prefix;
     int level;
     void (*print_header)(void);
@@ -181,7 +181,7 @@ static void ini_print_object_header(const char *name)
     }
 
     avio_printf(probe_out, "%s", name);
-    if (el && el->type == ARRAY)
+    if (el->type == ARRAY)
         avio_printf(probe_out, ".%"PRId64"", el->nb_elems);
     avio_printf(probe_out, "]\n");
 }
@@ -302,6 +302,8 @@ static void old_print_object_header(const char *name)
         return;
 
     str = p = av_strdup(name);
+    if (!str)
+        return;
     while (*p) {
         *p = av_toupper(*p);
         p++;
@@ -319,6 +321,8 @@ static void old_print_object_footer(const char *name)
         return;
 
     str = p = av_strdup(name);
+    if (!str)
+        return;
     while (*p) {
         *p = av_toupper(*p);
         p++;
@@ -604,6 +608,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
         case AVMEDIA_TYPE_VIDEO:
             probe_int("width", dec_ctx->width);
             probe_int("height", dec_ctx->height);
+            probe_int("coded_width", dec_ctx->coded_width);
+            probe_int("coded_height", dec_ctx->coded_height);
             probe_int("has_b_frames", dec_ctx->has_b_frames);
             if (dec_ctx->sample_aspect_ratio.num)
                 sar = &dec_ctx->sample_aspect_ratio;