On 12 Feb 2014, at 00:13, Vittorio Giovara <[email protected]> wrote:

> Compute the full rotatation angle exported by display_matrix.
> ---
> Updated patch using u32le as descriptor and AV_WL32 instead of the memcpy.
> The side data apparently survives after probing. I do not think it's 
> worthwhile
> adding a metadata entry too.
> Cheers,
>    Vittorio
> Changelog            |  1 +
> doc/APIchanges       |  4 ++++
> libavcodec/avcodec.h |  6 ++++++
> libavcodec/version.h |  2 +-
> libavformat/isom.h   |  1 +
> libavformat/mov.c    | 28 ++++++++++++++++++++++++++++
> 6 files changed, 41 insertions(+), 1 deletion(-)
> 
> diff --git a/Changelog b/Changelog
> index 6c54281..178d55d 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -57,6 +57,7 @@ version 10:
> - framepack filter
> - Mirillis FIC video decoder
> - Support DNx444
> +- mov rotation exported as AVPacketSideData

Maybe "mov rotation angle"?

> @@ -2964,6 +2983,15 @@ static int mov_read_packet(AVFormatContext *s, 
> AVPacket *pkt)
>                 sc->has_palette = 0;
>             }
>         }
> +        if (sc->rotation != 0) {
> +            uint8_t *rotation;
> +            rotation = av_packet_new_side_data(pkt, AV_PKT_DATA_ROTATION, 
> sizeof(uint32_t));
> +            if (rotation) {
> +                AV_WL32(rotation, sc->rotation);
> +                sc->rotation = 0;
> +            } else
> +                av_log(mov->fc, AV_LOG_ERROR, "Cannot append rotation angle 
> to packet\n");
> +        }
> #if CONFIG_DV_DEMUXER
>         if (mov->dv_demux && sc->dv_audio_container) {
>             avpriv_dv_produce_packet(mov->dv_demux, pkt, pkt->data, 
> pkt->size);
> -- 
> 1.8.4

Is there a chance that the packet has been used before and already contains 
side data? Or is it necessarily a new packet with no side data to begin with?

Tim
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to