[FFmpeg-devel] [PATCH] avcodec/alsdec: implement floating point decoding

Michael Niedermayer michael at niedermayer.cc
Fri Jul 22 18:49:50 EEST 2016


On Fri, Jul 22, 2016 at 06:22:30PM +0530, Umair Khan wrote:
> On Thu, Jul 21, 2016 at 6:18 PM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> > On Sun, Jul 17, 2016 at 12:06:03AM +0530, Umair Khan wrote:
[...]
> >> +static int decode_string(MLZDict *dict, unsigned char *buff, int string_code, int *first_char_code, unsigned long bufsize) {
> >> +    unsigned long count, offset;
> >> +    int current_code, parent_code, tmp_code;
> >> +
> >> +    count            = 0;
> >> +    current_code     = string_code;
> >> +    *first_char_code = CODE_UNSET;
> >> +
> >> +    while (count < bufsize) {
> >> +        switch (current_code) {
> >> +        case CODE_UNSET:
> >> +            return count;
> >> +            break;
> >> +        default:
> >> +            if (current_code < FIRST_CODE) {
> >> +                *first_char_code = current_code;
> >> +                buff[0] = current_code;
> >> +                count++;
> >> +                return count;
> >> +            } else {
> >> +                offset  = dict[current_code].match_len - 1;
> >> +                tmp_code = dict[current_code].char_code;
> >> +                buff[offset] = tmp_code;
> >> +                count++;
> >> +            }
> >> +            current_code = dict[current_code].parent_code;
> >> +            if ((current_code < 0) || (current_code > (DIC_INDEX_MAX - 1))) {
> >
> >> +                av_log(NULL, AV_LOG_ERROR, "MLZ dic index error.\n");
> >
> > it would be ideal if all av_log() would have a context instead of NULL
> 
> How to go ahead with this? Should I create MLZContext or something? If
> yes, could you please tell how?

possible or you pass a void *context

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20160722/14cc69a1/attachment.sig>


More information about the ffmpeg-devel mailing list