• Derek Buitenhuis's avatar
    ffprobe: Check for invalid matrix error when printing rotation · f5cd00bf
    Derek Buitenhuis authored
    av_display_rotation_get will return NAN when the display matrix is invalid,
    which would end up printing NAN as an integer in the rotation field. This
    is poor for multiple reasons:
    
    * Users of ffprobe have no way of discerning "valid but ugly rotation from
      display matrix" from "invalid display matrix".
    * It can have unintended consequences on some platforms, such as Linux x86_64,
      where NAN is equal to INT64_MIN, which, for example, when printed as JSON,
      which uses floating point for all numbers, can end up as invalid JSON or wit
      a number that cannot be reserialized as an integer at all.
    
    Since NAN is av_display_rotation_get's error case, just print 0 (no rotation)
    when that happens.
    Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
    f5cd00bf
Name
Last commit
Last update
..
Makefile Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_demux.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_hw.c Loading commit data...
ffmpeg_mux.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
fftools.manifest Loading commit data...
fftoolsres.rc Loading commit data...
fopen_utf8.h Loading commit data...
objpool.c Loading commit data...
objpool.h Loading commit data...
opt_common.c Loading commit data...
opt_common.h Loading commit data...
sync_queue.c Loading commit data...
sync_queue.h Loading commit data...
thread_queue.c Loading commit data...
thread_queue.h Loading commit data...