avformat/flvenc: fix codec_id_text check
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 2 Oct 2014 01:57:50 +0000 (03:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 2 Oct 2014 01:58:54 +0000 (03:58 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvenc.c

index 1534667..31a5c9e 100644 (file)
@@ -556,7 +556,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
     if (enc->codec_type == AVMEDIA_TYPE_DATA) {
         int data_size;
         int64_t metadata_size_pos = avio_tell(pb);
-        if (enc->codec_type == AV_CODEC_ID_TEXT) {
+        if (enc->codec_id == AV_CODEC_ID_TEXT) {
             // legacy FFmpeg magic?
             avio_w8(pb, AMF_DATA_TYPE_STRING);
             put_amf_string(pb, "onTextData");