On date Tuesday 2011-05-24 07:35:00 +0200, Anton Khirnov encoded:
> It doesn't do anything except produce an error message when set.
> ---
>  libavformat/avformat.h |    2 +-
>  libavformat/mpegts.c   |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 7e8cd80..35e6c15 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -235,8 +235,8 @@ typedef struct AVFormatParameters {
>      enum PixelFormat pix_fmt;
>      int channel; /**< Used to select DV channel. */
>      const char *standard; /**< TV standard, NTSC, PAL, SECAM */
> -    unsigned int mpeg2ts_raw:1;  /**< Force raw MPEG-2 transport stream 
> output, if possible. */
>  #if FF_API_FORMAT_PARAMETERS
> +    attribute_deprecated unsigned int mpeg2ts_raw:1;  /**< deprecated, use 
> mpegtsraw demuxer */
>      /**< deprecated, use mpegtsraw demuxer-specific options instead */
>      attribute_deprecated unsigned int mpeg2ts_compute_pcr:1;
>  #endif
> diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
> index bfaf7b5..fa4172f 100644
> --- a/libavformat/mpegts.c
> +++ b/libavformat/mpegts.c
> @@ -1470,16 +1470,16 @@ static int mpegts_read_header(AVFormatContext *s,
>      int len;
>      int64_t pos;
>  
> -    if (ap) {
>  #if FF_API_FORMAT_PARAMETERS
> +    if (ap) {
>          if (ap->mpeg2ts_compute_pcr)
>              ts->mpeg2ts_compute_pcr = ap->mpeg2ts_compute_pcr;
> -#endif
>          if(ap->mpeg2ts_raw){
>              av_log(s, AV_LOG_ERROR, "use mpegtsraw_demuxer!\n");
>              return -1;
>          }
>      }
> +#endif
>  
>      /* read the first 1024 bytes to get packet size */
>      pos = avio_tell(pb);

Looks OK to me.

After some research it turned out that the mpegts_raw option was added
in:

commit da24c5e330ab90b5249f4fb94044b78919f64d4f
Author: Fabrice Bellard <[email protected]>
Date:   Wed Oct 29 14:20:56 2003 +0000

    make AVFMT_NOHEADER flag dynamic - added av_open_input_stream()
    
    Originally committed as revision 2447 to svn://svn.ffmpeg.org/ffmpeg/trunk

and then made unnecessary with the addition of a separate
mpegts_demuxer in:

commit 38c48be213b86baa04e64762622afefbba1afa70
Author: Michael Niedermayer <[email protected]>
Date:   Sat Jun 2 20:57:31 2007 +0000

    split mpeg2ts_raw mode into its own demuxer using such a flag is an 
incredibly dirty hack
    
    Originally committed as revision 9173 to svn://svn.ffmpeg.org/ffmpeg/trunk


-- 
And then there was the lawyer that stepped in cow manure and thought
he was melting...
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to