From patchwork Fri Feb 17 21:41:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Dekker X-Patchwork-Id: 2596 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp373054vsb; Fri, 17 Feb 2017 13:41:29 -0800 (PST) X-Received: by 10.223.133.226 with SMTP id 31mr7578355wru.137.1487367689716; Fri, 17 Feb 2017 13:41:29 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p9si14707883wrp.181.2017.02.17.13.41.28; Fri, 17 Feb 2017 13:41:29 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li; dkim=neutral (body hash did not verify) header.i=@messagingengine.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6E5B168999C; Fri, 17 Feb 2017 23:41:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DA943680CD1 for ; Fri, 17 Feb 2017 23:41:12 +0200 (EET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 323FA20795 for ; Fri, 17 Feb 2017 16:41:18 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 17 Feb 2017 16:41:18 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=itanimul.li; h= date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=jx5X5PWPjAlxwAvAbGyQB7t1r5k =; b=FhaDc8L0tsaP83cVwFMGNFUS9O+a1FulULujWCZ9xvUKkFNgCjH7ZUbfMVo i4btmitz0CXTbXxsEexkTw4RrcodcFyloGPbnLbmNFeFhHtG3qgTybk8FNMiX1BW bv4YWypHet3HnoA6cS9qLz7zjonzL6/jzLe32wWweCJCr8t8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=jx 5X5PWPjAlxwAvAbGyQB7t1r5k=; b=l+fCLz5jx8oU+sCREn/Qz/eXfPaPNHtYgo 2kJiTnNlz/Rw9NtC2C8b3Vu+k/NFydJVaTrABlFZ1MwrC/jqvYFyZS+UMzP4lorU ygO9HP/kPDm/VJj9HJM50Y05UCgXXqBVBJDsJh/ljrOL4Zz9aeGn1YJslnd/qjIr usBZvKIGQ= X-ME-Sender: X-Sasl-enc: +Let9MDlw5aIjHbEFXrkQlh8IdF3BsmnYxfzIx1etd0/ 1487367677 Received: from localhost (cpc75394-sotn16-2-0-cust168.15-1.cable.virginm.net [82.22.8.169]) by mail.messagingengine.com (Postfix) with ESMTPA id C86367E0D2 for ; Fri, 17 Feb 2017 16:41:17 -0500 (EST) From: Josh de Kock To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 Feb 2017 21:41:15 +0000 Message-Id: <20170217214115.99553-1-josh@itanimul.li> X-Mailer: git-send-email 2.10.1 (Apple Git-78) Subject: [FFmpeg-devel] [PATCH] lavf/mpegts: document DVB teletext PMT fields X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Josh de Kock --- libavformat/mpegts.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 590abb0..bcf2118 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1718,6 +1718,11 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type case 0x56: /* DVB teletext descriptor */ { uint8_t *extradata = NULL; + /* 5 bytes per DVB teletext substream data: + * ISO_639_language_code (3 bytes), + * teletext_type (5 bits), + * teletext_magazine_number (3 bits), + * teletext_page_number (1 byte) */ int language_count = desc_len / 5; if (desc_len > 0 && desc_len % 5 != 0) @@ -1745,6 +1750,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type language[i * 4 + 3] = ','; memcpy(extradata, *pp, 2); + /* The page number which libzvbi will output is extradata[0] & 7 * 256 + extradata[1] */ extradata += 2; *pp += 2;