]> git.sesse.net Git - ffmpeg/commitdiff
avformat: fix AVStream private fields marker
authorwm4 <nfxjfg@googlemail.com>
Mon, 13 Feb 2017 10:50:54 +0000 (11:50 +0100)
committerwm4 <nfxjfg@googlemail.com>
Thu, 2 Mar 2017 09:32:21 +0000 (10:32 +0100)
Public fields were added after the private fields (negating the entire
point of this). New private fields go into AVStreamInternal anyway.

The new marker was set by guessing which fields are supposed to be
private and wshich not. recommended_encoder_configuration is accessed by
ffserver_config.c directly, and is supposed to use the public API.

ffmpeg.c accesses AVStream.cur_dts, even though it's a private field,
but that seems to be an older error.

libavformat/avformat.h

index 64180bca9e32a0964ccd72865c2a8ee0bed975e5..4c1b18e0028e89137f9fc640835dd0db076f93a5 100644 (file)
@@ -1005,7 +1005,9 @@ typedef struct AVStream {
      * All fields below this line are not part of the public API. They
      * may not be used outside of libavformat and can be changed and
      * removed at will.
-     * New public fields should be added right above.
+     * Internal note: be aware that physically removing these fields
+     * will break ABI. Replace removed fields with dummy fields, and
+     * add new fields to AVStreamInternal.
      *****************************************************************
      */
 
@@ -1201,6 +1203,12 @@ typedef struct AVStream {
      */
     int inject_global_side_data;
 
+    /*****************************************************************
+     * All fields above this line are not part of the public API.
+     * Fields below are part of the public API and ABI again.
+     *****************************************************************
+     */
+
     /**
      * String containing paris of key and values describing recommended encoder configuration.
      * Paris are separated by ','.