[FFmpeg-devel] [PATCH 01/11] avformat/matroskaenc: don't reserve space for stream duration tags if the output is not seekable

Michael Niedermayer michael at niedermayer.cc
Wed Oct 5 03:00:03 EEST 2016


On Mon, Oct 03, 2016 at 08:36:57PM -0300, James Almer wrote:
> The durations are never written in that situation.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/matroskaenc.c    | 2 +-
>  tests/fate/matroska.mak      | 2 +-
>  tests/fate/wavpack.mak       | 4 ++--
>  tests/ref/fate/binsub-mksenc | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 3eeb09b..32d5dcf 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1376,7 +1376,7 @@ static int mkv_write_tags(AVFormatContext *s)
>          if (ret < 0) return ret;
>      }
>  
> -    if (!mkv->is_live) {
> +    if (s->pb->seekable && !mkv->is_live) {
>          for (i = 0; i < s->nb_streams; i++) {
>              ebml_master tag_target;
>              ebml_master tag;

LGTM


> diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
> index 8e4a1e8..36cc779 100644
> --- a/tests/fate/matroska.mak
> +++ b/tests/fate/matroska.mak
> @@ -4,6 +4,6 @@
>  FATE_MATROSKA-$(call DEMMUX, MATROSKA, MATROSKA) += fate-matroska-remux
>  fate-matroska-remux: CMD = md5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm -color_trc 4 -c:v copy -fflags +bitexact -strict -2 -f matroska
>  fate-matroska-remux: CMP = oneline
> -fate-matroska-remux: REF = f08b20b90f158a4de5a02a52c25596b9
> +fate-matroska-remux: REF = 1040692ffdfee2428954af79a7d5d155

off topic, but storing the output files on disk and printing some
richer information would be quite usefull to understand changes

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161005/e678237d/attachment.sig>


More information about the ffmpeg-devel mailing list