From patchwork Sat Jul 14 08:45:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan X-Patchwork-Id: 9724 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp332305jad; Sat, 14 Jul 2018 01:45:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdbqTionqZsJzhXUyUOwqPQvTGFFzFCQ9zhgmJTowmV5wLK/Sg3GCi6FzhSkna11zuAOzF+ X-Received: by 2002:adf:b202:: with SMTP id u2-v6mr6941800wra.19.1531557936795; Sat, 14 Jul 2018 01:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531557936; cv=none; d=google.com; s=arc-20160816; b=FKgddIAe7dpkIEURhM+Gw+g8cf0M31Ro3ALGlggAfophgcwK5h4ybVEQeh8p9wj3se VfDME+sFu8Vqnadc0MW0BHN9qxGzZc09NNiVDjtxidVnCVXZe/w7ujh4PM0un4NKA5Nv 5zaxTuiUt1iuPZyHFxN5ephGXV+iUDD7oFIcVwUkUFzxBRT0qfbeuP6ZRyAIe+0FWeIP z2IPMnUFqK1eFsYMOPfQllJ+Pbpveh7KEqWbFooE5T5rqWX39o/dAqgDJqfjU2hX8huv 7ScxPhWgcVi2w6jldkUOwMNQH8C+GlhJSrALAJWiVUbI2FPe7PFuMINS9QI8il+QdqBc 1mKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:content-disposition:content-language :mime-version:user-agent:date:message-id:from:to:dkim-signature :delivered-to:arc-authentication-results; bh=nBOTh4332AYWzDf7Il1wglhjVMgpMD+1q56J9Beju2Y=; b=oueFApR+RNMup2K2GX5GMz25uw2kHDPFpTQ4OJphqSIgIRXHIpu5gQPK0ZKbU778FJ cN1jqMtjTpuduUzCVsp/fbTTGIwl+2O9Ba/HTcRM2hGlAKPptDSW/CYid6aR/AJmtUKm cbtUKooxyw9KVyBpGTGOXRZaHxD8YMQiptVDDN+BjBrYwRzmF1onqP8dxMZKOTg+18uG w4DI5B5gYKxPDq3026y5J59cD/7+YnFRWJdbvip3N7gk4CRaNmvGPjJEHcg0rzf1JZUA vdZt6uidlVAcMYSuZfcfN87paFS9wGKbiMMIRZiHZwSa8xHQqWw7KFIJuXTtkEcOutxR xkNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="HH4/qr74"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d12-v6si13648497wrn.105.2018.07.14.01.45.36; Sat, 14 Jul 2018 01:45:36 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b="HH4/qr74"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0236B68A692; Sat, 14 Jul 2018 11:45:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2803068A4C7 for ; Sat, 14 Jul 2018 11:45:19 +0300 (EEST) Received: by mail-pf0-f172.google.com with SMTP id q7-v6so22785371pff.2 for ; Sat, 14 Jul 2018 01:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=Sy81CV1RCEFZvxax820I6TBUZerOUQEv/iOH6oNmvxM=; b=HH4/qr74j2F6MvmN+/88VnQBv/1pWASYZPhJCLOFnx5Sh3KsKHcJMCehsxJpwsPA7A 5039VibhPR+B1Njkx0H20VFnBLzBqSzS3MGwqbqdru+ilX++56r4CObOjoFiIex0wICf 6jDSN2A1h6FTOqYAcDLGgIFh9fd2TDfgTWrGZ2185M9MPFXzFw3iu5dhoUHHhvbMG8yx a31MLVXsXhVLYH75fsJlIc4G7Ci6nBZcKiqTcptYGiNiSrJT/b5jWz5svb6nEhyTW7DS w7pXG1GD3bsT97m0uEtuJZmR4Dm/xia9KtEtmTqCHBULS6Jy24HZqCgMxRq3Z+hJpD4G r5gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=Sy81CV1RCEFZvxax820I6TBUZerOUQEv/iOH6oNmvxM=; b=RIXsJ8ty6Ke+4IIEBTY7YsvrWjY1Z67mXs/A7AML63ivO7en0XuDG1bI4LMOf7wZ2D zQauUPf6iNl6WwCpdGo1xa7mVGeLONBEDpRTtFCI1sBpfqmc2dQm1XB7HPMUXBOzEY1J Q2Fnffibr+YkP/zSYDbSQkE5Jxf0Q8g8UP3nS9HOOfVoO/E1PgMe/1Cz8oh5FG+7J8gM xp3ZtAm0/crDCpQ7A4CUIW3F4+ZIlutTt5jr1wqV2yAyWYXRxnFXAps5NI1U/Ppg/rPP 7I3wAJfNm/sqgc8hH2UC3s5UpAzG+oMKG+wokPdzuDaMoZtpjuA2UTas+GjrU+sRVtbR 8uTQ== X-Gm-Message-State: AOUpUlHfeFnOS+MVbqyHPDJY94pvf7idzYldS9TQO7h5Bu30/wzIezBq g4JypgnT/FgdOiH23WCPfWjELSCO X-Received: by 2002:a62:229a:: with SMTP id p26-v6mr10364263pfj.53.1531557925864; Sat, 14 Jul 2018 01:45:25 -0700 (PDT) Received: from [192.168.1.225] ([183.87.90.217]) by smtp.gmail.com with ESMTPSA id 86-v6sm41668722pfh.0.2018.07.14.01.45.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jul 2018 01:45:24 -0700 (PDT) To: ffmpeg-devel@ffmpeg.org From: Gyan Doshi Message-ID: Date: Sat, 14 Jul 2018 14:15:22 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US Content-Disposition: attachment; filename*0="0001-avformat-mov-only-set-handler_name-from-mdia-hdlr.patch" X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] avformat/mov: only set handler_name from mdia->hdlr 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From 125c35cb08ece825dade33b9dc7bf7babe1fc46d Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Sat, 14 Jul 2018 13:59:51 +0530 Subject: [PATCH] avformat/mov: only set handler_name from mdia->hdlr 6 FATE references updated. Fixes #7104 --- libavformat/mov.c | 3 ++- tests/ref/fate/copy-trac236 | 4 ++-- tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov | 2 +- tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 2 +- tests/ref/fate/mov-zombie | 2 +- tests/ref/fate/rgb24-mkv | 4 ++-- tests/ref/lavf-fate/mov_qtrle_mace6 | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index bdd6f64108..eda3fff6d5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -765,7 +765,8 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) title_str[title_size] = 0; if (title_str[0]) { int off = (!c->isom && title_str[0] == title_size - 1); - av_dict_set(&st->metadata, "handler_name", title_str + off, 0); + // flag added so as to not set stream handler name if already set from mdia->hdlr + av_dict_set(&st->metadata, "handler_name", title_str + off, AV_DICT_DONT_OVERWRITE); } av_freep(&title_str); } diff --git a/tests/ref/fate/copy-trac236 b/tests/ref/fate/copy-trac236 index 6470c05a05..2ac05e63e6 100644 --- a/tests/ref/fate/copy-trac236 +++ b/tests/ref/fate/copy-trac236 @@ -1,5 +1,5 @@ -8b57d14c14bb4cdaca660d161e08eb8f *tests/data/fate/copy-trac236.mov -630861 tests/data/fate/copy-trac236.mov +959a4d78c6c11936e361fc3101a013eb *tests/data/fate/copy-trac236.mov +630860 tests/data/fate/copy-trac236.mov #tb 0: 100/2997 #media_type 0: video #codec_id 0: rawvideo diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov index f5ecdd4311..cde9f2ff9e 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov @@ -68,6 +68,6 @@ DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 TAG:language=eng -TAG:handler_name=DataHandler +TAG:handler_name=Module de gestion video TAG:encoder=HAPAlpha Only [/STREAM] diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov index c3a0a599fd..dd85e68d9e 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov @@ -68,6 +68,6 @@ DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 TAG:language=eng -TAG:handler_name=DataHandler +TAG:handler_name=Module de gestion video TAG:encoder=HAPQ [/STREAM] diff --git a/tests/ref/fate/mov-zombie b/tests/ref/fate/mov-zombie index fef2adc354..f45fa59637 100644 --- a/tests/ref/fate/mov-zombie +++ b/tests/ref/fate/mov-zombie @@ -129,5 +129,5 @@ packet|codec_type=video|stream_index=0|pts=188623|pts_time=2.095811|dts=188622|d frame|media_type=video|stream_index=0|key_frame=0|pkt_pts=188623|pkt_pts_time=2.095811|pkt_dts=188622|pkt_dts_time=2.095800|best_effort_timestamp=188623|best_effort_timestamp_time=2.095811|pkt_duration=3003|pkt_duration_time=0.033367|pkt_pos=100846|pkt_size=974|width=160|height=240|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=B|coded_picture_number=64|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleft packet|codec_type=video|stream_index=0|pts=197632|pts_time=2.195911|dts=191625|dts_time=2.129167|duration=3003|duration_time=0.033367|convergence_duration=N/A|convergence_duration_time=N/A|size=580|pos=101820|flags=__ frame|media_type=video|stream_index=0|key_frame=0|pkt_pts=191626|pkt_pts_time=2.129178|pkt_dts=N/A|pkt_dts_time=N/A|best_effort_timestamp=191626|best_effort_timestamp_time=2.129178|pkt_duration=3003|pkt_duration_time=0.033367|pkt_pos=99180|pkt_size=1666|width=160|height=240|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=P|coded_picture_number=63|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleft -stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_time_base=212521/12744000|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|timecode=N/A|refs=2|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|disposition:default=1|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|disposition:timed_thumbnails=0|tag:rotate=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Alias Data Handler|tag:encoder=H.264 +stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_time_base=212521/12744000|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|timecode=N/A|refs=2|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|disposition:default=1|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|disposition:timed_thumbnails=0|tag:rotate=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:encoder=H.264 side_data|side_data_type=Display Matrix|displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|rotation=0 diff --git a/tests/ref/fate/rgb24-mkv b/tests/ref/fate/rgb24-mkv index 439b2bc5e9..9f0064b08d 100644 --- a/tests/ref/fate/rgb24-mkv +++ b/tests/ref/fate/rgb24-mkv @@ -1,5 +1,5 @@ -09ee413b2d92a6be5e3b18e9e20a1f74 *tests/data/fate/rgb24-mkv.matroska -58342 tests/data/fate/rgb24-mkv.matroska +d84d5a83971be9c2caa2f4c37bbbfefd *tests/data/fate/rgb24-mkv.matroska +58343 tests/data/fate/rgb24-mkv.matroska #tb 0: 1/10 #media_type 0: video #codec_id 0: rawvideo diff --git a/tests/ref/lavf-fate/mov_qtrle_mace6 b/tests/ref/lavf-fate/mov_qtrle_mace6 index 3afb909574..e8fc882e9d 100644 --- a/tests/ref/lavf-fate/mov_qtrle_mace6 +++ b/tests/ref/lavf-fate/mov_qtrle_mace6 @@ -1,3 +1,3 @@ -f9715cc38a3206bcdf105786905255af *./tests/data/lavf-fate/lavf.mov +f0ae34fb90e11342624e092094273aef *./tests/data/lavf-fate/lavf.mov 1270415 ./tests/data/lavf-fate/lavf.mov ./tests/data/lavf-fate/lavf.mov CRC=0x9320cd26