Bug #307
[patch] mkv aspect ratio
0%
Description
Hi,
I believe there is a bug in the mkv muxer related to aspect ratios.
Indeed, it seems to me that the aspect ratio written as Display Aspect Ratio in the mkv files is actually the Samble Aspect Ratio that comes from the h264 stream. This is not always correct.
The attach patch is an attempt to fix this.
-sbi
Files
History
Updated by Andreas Smas about 14 years ago
Hm, I know this is a problem for h264. But for mpeg2 I think it does the correct thing?
Updated by Andreas Smas about 14 years ago
- Found in version set to fixed
Fixed differently in r5478.
Please verify that it works :-)
Updated by sbi - about 14 years ago
- Status changed from Fixed to Need feedback
- Found in version deleted (
fixed)
Almost. This should take care of interlacing:
diff --git a/tvheadend/src/parser_h264.c b/tvheadend/src/parser_h264.c
index 1114f7e..3833049 100644
--- a/tvheadend/src/parser_h264.c
+++ b/tvheadend/src/parser_h264.c@ -410,8 +410,8
@ h264_decode_slice_header(th_stream_t *st, bitstream_t *bs, i
if(p->sps[sps_id].aspect_num && p->sps[sps_id].aspect_den) {
- int w = p->sps[sps_id].aspect_num * p->sps[sps_id].width;
- int h = p->sps[sps_id].aspect_den * p->sps[sps_id].height;
+ int w = p->sps[sps_id].aspect_num * st->st_width;
+ int h = p->sps[sps_id].aspect_den * st->st_height;
int d = gcd(w, h);
st->st_aspect_num = w / d;
Updated by Andreas Smas about 14 years ago
- Status changed from Need feedback to Fixed
- Found in version set to fixed
Aye, Fixed in 5481