[FFmpeg-devel] [PATCH 2/2] libx265: Only set the SAR if it is valid

anshul anshul.ffmpeg at gmail.com
Thu Apr 10 15:29:14 CEST 2014


On 04/10/2014 05:58 PM, Derek Buitenhuis wrote:
> +    if (avctx->sample_aspect_ratio.num > 0 && avctx->sample_aspect_ratio.den > 0) {
I don't think this condition is valid.
I have attached the logs where SAR is 0:1, I have some media with 0:0.
Please ignore this if those condition are already taken care.

The below streams with SAR 0:1 and 0:0 are working fine without this patch.
so please consider this case too.



ffprobe version N-62251-g04f5332 Copyright (c) 2007-2014 the FFmpeg 
developers
   built on Apr 10 2014 16:17:43 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libfaac --enable-libfreetype --enable-nonfree 
--enable-gpl --enable-libx264 --enable-memalign-hack --enable-shared
   libavutil      52. 74.100 / 52. 74.100
   libavcodec     55. 58.102 / 55. 58.102
   libavformat    55. 36.102 / 55. 36.102
   libavdevice    55. 11.100 / 55. 11.100
   libavfilter     4.  3.100 /  4.  3.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
Input #0, image2, from 'test/main1/431.jpg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuvj420p(pc), 1024x576, 25 tbr, 25 tbn, 
25 tbc
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=MJPEG (Motion JPEG)
profile=unknown
codec_type=video
codec_time_base=1/25
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=1024
height=576
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=yuvj420p
level=-99
timecode=N/A
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=0
start_time=0.000000
duration_ts=1
duration=0.040000
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]


-Anshul



More information about the ffmpeg-devel mailing list