]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Compute correct aspect when interlaced
authorAndreas Öman <andreas@lonelycoder.com>
Tue, 19 Oct 2010 18:02:54 +0000 (18:02 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Tue, 19 Oct 2010 18:02:54 +0000 (18:02 +0000)
src/parser_h264.c

index 1114f7e0a94d582c394ded2e1543f8d2e00846c4..383304900437be87d0af698fbd7e4f71a4eccafb 100644 (file)
@@ -410,8 +410,8 @@ h264_decode_slice_header(th_stream_t *st, bitstream_t *bs, int *pkttype,
 
   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;