History

lavc: add stream-global packet side data

This is similar to what is done for AVStream.

Anton Khirnov committed 11 years ago

Commit 84adab31 parent 31c51f73 files · +20 −2Browse files

Unified · Split

3 files
  1. doc/APIchanges +2 −1
  2. libavcodec/avcodec.h +10 −0
  3. libavcodec/utils.c +8 −1
doc/APIchanges+2−1
@@ -14,7 +14,8 @@ libavutil: 2015-08-28 · 13 unmodified lines
14API changes, most recent first:14API changes, most recent first:
15 15
162015-xx-xx - xxxxxxx - lavc 57.11.0 - avcodec.h162015-xx-xx - xxxxxxx - lavc 57.11.0 - avcodec.h
17 Add av_packet_add_side_data().17 xxxxxxx - Add av_packet_add_side_data().
18 xxxxxxx - Add AVCodecContext.coded_side_data.
18 19
192015-xx-xx - xxxxxxx - lavc 57.9.1 - avcodec.h202015-xx-xx - xxxxxxx - lavc 57.9.1 - avcodec.h
20 Deprecate rtp_callback without replacement, i.e. it won't be possible to21 Deprecate rtp_callback without replacement, i.e. it won't be possible to
libavcodec/avcodec.h+10−0
@@ -2925,6 +2925,16 @@ typedef struct AVCodecContext { · 2924 unmodified lines
2925 * - decoding: Set by libavcodec before calling get_format()2925 * - decoding: Set by libavcodec before calling get_format()
2926 */2926 */
2927 enum AVPixelFormat sw_pix_fmt;2927 enum AVPixelFormat sw_pix_fmt;
2928
2929 /**
2930 * Additional data associated with the entire coded stream.
2931 *
2932 * - decoding: unused
2933 * - encoding: may be set by libavcodec after avcodec_open2().
2934 */
2935 AVPacketSideData *coded_side_data;
2936 int nb_coded_side_data;
2937
2928} AVCodecContext;2938} AVCodecContext;
2929 2939
2930/**2940/**
libavcodec/utils.c+8−1
@@ -1603,9 +1603,11 @@ void avsubtitle_free(AVSubtitle *sub) · 1602 unmodified lines
1603 1603
1604av_cold int avcodec_close(AVCodecContext *avctx)1604av_cold int avcodec_close(AVCodecContext *avctx)
1605{1605{
1606 int i;
1607
1606 if (avcodec_is_open(avctx)) {1608 if (avcodec_is_open(avctx)) {
1607 FramePool *pool = avctx->internal->pool;1609 FramePool *pool = avctx->internal->pool;
1608 int i;1610
1609 if (HAVE_THREADS && avctx->internal->thread_ctx)1611 if (HAVE_THREADS && avctx->internal->thread_ctx)
1610 ff_thread_free(avctx);1612 ff_thread_free(avctx);
1611 if (avctx->codec && avctx->codec->close)1613 if (avctx->codec && avctx->codec->close)
@@ -1622,6 +1624,11 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 10 unmodified lines
1622 av_freep(&avctx->internal);1624 av_freep(&avctx->internal);
1623 }1625 }
1624 1626
1627 for (i = 0; i < avctx->nb_coded_side_data; i++)
1628 av_freep(&avctx->coded_side_data[i].data);
1629 av_freep(&avctx->coded_side_data);
1630 avctx->nb_coded_side_data = 0;
1631
1625 if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)1632 if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)
1626 av_opt_free(avctx->priv_data);1633 av_opt_free(avctx->priv_data);
1627 av_opt_free(avctx);1634 av_opt_free(avctx);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t