[FFmpeg-devel] [RFC][PATCH 3/3] tta: Add support for encrypted streams

James Almer jamrial at gmail.com
Sun Jan 27 20:17:01 CET 2013


On 27/01/13 12:39 PM, Paul B Mahol wrote:
> On 1/27/13, James Almer <jamrial at gmail.com> wrote:
>> The code to decrypt data is added to the decoder, and
>> the needed code to provide the decrypt key is added
>> to the TTA demuxer.
>>
>> Any other container that supports TTA streams will
>> need extra code to process the password and send it
>> to the decoder using packet side data (main extradata
>> is used for the TTA header).
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>  libavcodec/tta.c  | 27 ++++++++++++++++++---------
>>  libavformat/tta.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
>>  2 files changed, 66 insertions(+), 11 deletions(-)
>>
>> diff --git a/libavcodec/tta.c b/libavcodec/tta.c
>> index fb793be..b012408 100644
>> --- a/libavcodec/tta.c
>> +++ b/libavcodec/tta.c
>> @@ -44,7 +44,7 @@ typedef struct TTAFilter {
>>      int32_t qm[MAX_ORDER];
>>      int32_t dx[MAX_ORDER];
>>      int32_t dl[MAX_ORDER];
>> -} TTAFilter;
>> +DECLARE_ALIGNED(16, }, TTAFilter);
> 
> This looks strange to me.

You're right, i just noticed it wouldn't work on MSVC.

Looking at libtta the struct in question supposedly needs the aligned attribute,
though i just made some test without it and it seems to work the same.

I can either remove the alignment declaration, or change it to something like

} DECLARE_ALIGNED(16, , TTAFilter);

Since the second argument is not needed.

Regards.


More information about the ffmpeg-devel mailing list