# HG changeset patch # User upsuper # Date 1353109167 0 # Node ID 5e22bb28e6b77470bc0037244a02d16271500be6 # Parent 891b14e68b02be92140b5111a46b5f2eeb8d1d94 Print rotation information as identify msg This patch prints rotation information in metadata of mov files as identify message with tag "ID_VID__ROTATE" to enable frontends to rotate the video. diff -r 891b14e68b02 -r 5e22bb28e6b7 libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Thu Nov 15 18:44:19 2012 +0000 +++ b/libmpdemux/demux_lavf.c Fri Nov 16 23:39:27 2012 +0000 @@ -280,6 +280,7 @@ int stream_id; AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0); AVDictionaryEntry *title= av_dict_get(st->metadata, "title", NULL, 0); + AVDictionaryEntry *rot = av_dict_get(st->metadata, "rotate", NULL, 0); int g; switch(codec->codec_type){ @@ -399,6 +400,8 @@ sh_video->i_bps=codec->bit_rate/8; if (title && title->value) mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value); + if (rot && rot->value) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_ROTATE=%s\n", priv->video_streams, rot->value); mp_msg(MSGT_DEMUX,MSGL_DBG2,"aspect= %d*%d/(%d*%d)\n", codec->width, codec->sample_aspect_ratio.num, codec->height, codec->sample_aspect_ratio.den);