~ppsspp/ppsspp/ffmpeg

« back to all changes in this revision

Viewing changes to libavformat/avienc.c

  • Committer: Henrik Rydgård
  • Date: 2014-01-03 10:44:32 UTC
  • Revision ID: git-v1:87c6c126784b1718bfa448ecf2e6a9fef781eb4e
Update our ffmpeg snapshot to a clone of the official repository.

This is because Maxim's at3plus support has been officially merged!

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "avi.h"
27
27
#include "avio_internal.h"
28
28
#include "riff.h"
 
29
#include "libavformat/avlanguage.h"
 
30
#include "libavutil/avstring.h"
29
31
#include "libavutil/intreadwrite.h"
30
32
#include "libavutil/dict.h"
31
33
#include "libavutil/avassert.h"
291
293
            // are not (yet) supported.
292
294
            if (stream->codec_id != AV_CODEC_ID_XSUB) break;
293
295
        case AVMEDIA_TYPE_VIDEO:
294
 
            ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);
 
296
            ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0, 0);
295
297
            break;
296
298
        case AVMEDIA_TYPE_AUDIO:
297
299
            if ((ret = ff_put_wav_header(pb, stream)) < 0) {
309
311
            ff_riff_write_info_tag(s->pb, "strn", t->value);
310
312
            t = NULL;
311
313
        }
 
314
        if(stream->codec_id == AV_CODEC_ID_XSUB
 
315
           && (t = av_dict_get(s->streams[i]->metadata, "language", NULL, 0))) {
 
316
            const char* langstr = av_convert_lang_to(t->value, AV_LANG_ISO639_1);
 
317
            t = NULL;
 
318
            if (langstr) {
 
319
                char* str = av_asprintf("Subtitle - %s-xx;02", langstr);
 
320
                ff_riff_write_info_tag(s->pb, "strn", str);
 
321
                av_free(str);
 
322
            }
 
323
        }
312
324
      }
313
325
 
314
326
        if (pb->seekable) {
661
673
    .codec_tag         = (const AVCodecTag* const []){
662
674
        ff_codec_bmp_tags, ff_codec_wav_tags, 0
663
675
    },
664
 
    .flags             = AVFMT_VARIABLE_FPS,
665
676
};