[FFmpeg-devel] [PATCH]Either set both display_width and display_height to pixeLwidth and pixel_height or none
Carl Eugen Hoyos
cehoyos at ag.or.at
Wed Apr 3 10:06:26 CEST 2013
Hi!
Attached patch fixes ticket #2429 for me.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b8b6e98..9ff8eeb 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1576,10 +1576,10 @@ static int matroska_read_header(AVFormatContext *s)
if (track->type == MATROSKA_TRACK_TYPE_VIDEO) {
if (!track->default_duration && track->video.frame_rate > 0)
track->default_duration = 1000000000/track->video.frame_rate;
- if (!track->video.display_width)
+ if (!track->video.display_width || !track->video.display_height) {
track->video.display_width = track->video.pixel_width;
- if (!track->video.display_height)
track->video.display_height = track->video.pixel_height;
+ }
if (track->video.color_space.size == 4)
fourcc = AV_RL32(track->video.color_space.data);
} else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
More information about the ffmpeg-devel
mailing list