comparison mpegts.c @ 5982:f74198942337 libavformat

Mark av_metadata_set() as deprecated, and use av_metadata_set2() in its place. av_metadata_set() is going to be dropped at the next major bump.
author stefano
date Sun, 25 Apr 2010 14:27:42 +0000
parents c1cd2ffd5cdc
children 86f5c95d5ca6
comparison
equal deleted inserted replaced
5981:c1cd2ffd5cdc 5982:f74198942337
961 case 0x56: /* DVB teletext descriptor */ 961 case 0x56: /* DVB teletext descriptor */
962 language[0] = get8(&p, desc_end); 962 language[0] = get8(&p, desc_end);
963 language[1] = get8(&p, desc_end); 963 language[1] = get8(&p, desc_end);
964 language[2] = get8(&p, desc_end); 964 language[2] = get8(&p, desc_end);
965 language[3] = 0; 965 language[3] = 0;
966 av_metadata_set(&st->metadata, "language", language); 966 av_metadata_set2(&st->metadata, "language", language, 0);
967 break; 967 break;
968 case 0x59: /* subtitling descriptor */ 968 case 0x59: /* subtitling descriptor */
969 language[0] = get8(&p, desc_end); 969 language[0] = get8(&p, desc_end);
970 language[1] = get8(&p, desc_end); 970 language[1] = get8(&p, desc_end);
971 language[2] = get8(&p, desc_end); 971 language[2] = get8(&p, desc_end);
972 language[3] = 0; 972 language[3] = 0;
973 get8(&p, desc_end); 973 get8(&p, desc_end);
974 comp_page = get16(&p, desc_end); 974 comp_page = get16(&p, desc_end);
975 anc_page = get16(&p, desc_end); 975 anc_page = get16(&p, desc_end);
976 st->codec->sub_id = (anc_page << 16) | comp_page; 976 st->codec->sub_id = (anc_page << 16) | comp_page;
977 av_metadata_set(&st->metadata, "language", language); 977 av_metadata_set2(&st->metadata, "language", language, 0);
978 break; 978 break;
979 case 0x0a: /* ISO 639 language descriptor */ 979 case 0x0a: /* ISO 639 language descriptor */
980 language[0] = get8(&p, desc_end); 980 language[0] = get8(&p, desc_end);
981 language[1] = get8(&p, desc_end); 981 language[1] = get8(&p, desc_end);
982 language[2] = get8(&p, desc_end); 982 language[2] = get8(&p, desc_end);
983 language[3] = 0; 983 language[3] = 0;
984 av_metadata_set(&st->metadata, "language", language); 984 av_metadata_set2(&st->metadata, "language", language, 0);
985 break; 985 break;
986 case 0x05: /* registration descriptor */ 986 case 0x05: /* registration descriptor */
987 st->codec->codec_tag = bytestream_get_le32(&p); 987 st->codec->codec_tag = bytestream_get_le32(&p);
988 dprintf(ts->stream, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag); 988 dprintf(ts->stream, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag);
989 if (st->codec->codec_id == CODEC_ID_NONE && 989 if (st->codec->codec_id == CODEC_ID_NONE &&
1107 break; 1107 break;
1108 name = getstr8(&p, p_end); 1108 name = getstr8(&p, p_end);
1109 if (name) { 1109 if (name) {
1110 AVProgram *program = av_new_program(ts->stream, sid); 1110 AVProgram *program = av_new_program(ts->stream, sid);
1111 if(program) { 1111 if(program) {
1112 av_metadata_set(&program->metadata, "name", name); 1112 av_metadata_set2(&program->metadata, "name", name, 0);
1113 av_metadata_set(&program->metadata, "provider_name", provider_name); 1113 av_metadata_set2(&program->metadata, "provider_name", provider_name, 0);
1114 } 1114 }
1115 } 1115 }
1116 av_free(name); 1116 av_free(name);
1117 av_free(provider_name); 1117 av_free(provider_name);
1118 break; 1118 break;