Unified · Split
| @@ -77,6 +77,7 @@ static void free_stream(AVFormatContext *s, int i) · 76 unmodified lines | |||
| 77 | 77 | ||
| 78 | av_freep(&stream->private); | 78 | av_freep(&stream->private); |
| 79 | av_freep(&stream->new_metadata); | 79 | av_freep(&stream->new_metadata); |
| 80 | av_freep(&stream->new_extradata); | ||
| 80 | } | 81 | } |
| 81 | 82 | ||
| 82 | //FIXME We could avoid some structure duplication | 83 | //FIXME We could avoid some structure duplication |
| @@ -888,6 +889,16 @@ retry: · 805 unmodified lines | |||
| 888 | os->new_metadata_size = 0; | 889 | os->new_metadata_size = 0; |
| 889 | } | 890 | } |
| 890 | 891 | ||
| 892 | if (os->new_extradata) { | ||
| 893 | ret = av_packet_add_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, | ||
| 894 | os->new_extradata, os->new_extradata_size); | ||
| 895 | if (ret < 0) | ||
| 896 | return ret; | ||
| 897 | |||
| 898 | os->new_extradata = NULL; | ||
| 899 | os->new_extradata_size = 0; | ||
| 900 | } | ||
| 901 | |||
| 891 | return psize; | 902 | return psize; |
| 892 | } | 903 | } |
| 893 | 904 | ||
| @@ -94,6 +94,8 @@ struct ogg_stream { · 93 unmodified lines | |||
| 94 | int end_trimming; ///< set the number of packets to drop from the end | 94 | int end_trimming; ///< set the number of packets to drop from the end |
| 95 | uint8_t *new_metadata; | 95 | uint8_t *new_metadata; |
| 96 | size_t new_metadata_size; | 96 | size_t new_metadata_size; |
| 97 | uint8_t *new_extradata; | ||
| 98 | size_t new_extradata_size; | ||
| 97 | void *private; | 99 | void *private; |
| 98 | }; | 100 | }; |
| 99 | 101 | ||