Mercurial > libavformat.hg
comparison mpegtsenc.c @ 5804:9f349253996d libavformat
In mpegts muxer, free adts context and temporary data
author | bcoudurier |
---|---|
date | Wed, 10 Mar 2010 09:20:32 +0000 |
parents | 405bb9032df6 |
children | 536e5527c1e0 |
comparison
equal
deleted
inserted
replaced
5803:405bb9032df6 | 5804:9f349253996d |
---|---|
867 } | 867 } |
868 | 868 |
869 memcpy(ts_st->payload + ts_st->payload_index, buf, size); | 869 memcpy(ts_st->payload + ts_st->payload_index, buf, size); |
870 ts_st->payload_index += size; | 870 ts_st->payload_index += size; |
871 | 871 |
872 av_free(data); | |
873 | |
872 return 0; | 874 return 0; |
873 } | 875 } |
874 | 876 |
875 static int mpegts_write_end(AVFormatContext *s) | 877 static int mpegts_write_end(AVFormatContext *s) |
876 { | 878 { |
886 ts_st = st->priv_data; | 888 ts_st = st->priv_data; |
887 if (ts_st->payload_index > 0) { | 889 if (ts_st->payload_index > 0) { |
888 mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_index, | 890 mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_index, |
889 ts_st->payload_pts, ts_st->payload_dts); | 891 ts_st->payload_pts, ts_st->payload_dts); |
890 } | 892 } |
893 av_freep(&ts_st->adts); | |
891 } | 894 } |
892 put_flush_packet(s->pb); | 895 put_flush_packet(s->pb); |
893 | 896 |
894 for(i = 0; i < ts->nb_services; i++) { | 897 for(i = 0; i < ts->nb_services; i++) { |
895 service = ts->services[i]; | 898 service = ts->services[i]; |