lavf: deprecate AVFormatParameters.mpeg2ts_raw.

It doesn't do anything except produce an error message when set.
pull/2/head
Anton Khirnov 14 years ago
parent 17a5556db5
commit fb37d57347
  1. 2
      libavformat/avformat.h
  2. 4
      libavformat/mpegts.c

@ -235,8 +235,8 @@ typedef struct AVFormatParameters {
enum PixelFormat pix_fmt; enum PixelFormat pix_fmt;
int channel; /**< Used to select DV channel. */ int channel; /**< Used to select DV channel. */
const char *standard; /**< TV standard, NTSC, PAL, SECAM */ 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 #if FF_API_FORMAT_PARAMETERS
attribute_deprecated unsigned int mpeg2ts_raw:1; /**< deprecated, use mpegtsraw demuxer */
/**< deprecated, use mpegtsraw demuxer-specific options instead */ /**< deprecated, use mpegtsraw demuxer-specific options instead */
attribute_deprecated unsigned int mpeg2ts_compute_pcr:1; attribute_deprecated unsigned int mpeg2ts_compute_pcr:1;
#endif #endif

@ -1470,16 +1470,16 @@ static int mpegts_read_header(AVFormatContext *s,
int len; int len;
int64_t pos; int64_t pos;
if (ap) {
#if FF_API_FORMAT_PARAMETERS #if FF_API_FORMAT_PARAMETERS
if (ap) {
if (ap->mpeg2ts_compute_pcr) if (ap->mpeg2ts_compute_pcr)
ts->mpeg2ts_compute_pcr = ap->mpeg2ts_compute_pcr; ts->mpeg2ts_compute_pcr = ap->mpeg2ts_compute_pcr;
#endif
if(ap->mpeg2ts_raw){ if(ap->mpeg2ts_raw){
av_log(s, AV_LOG_ERROR, "use mpegtsraw_demuxer!\n"); av_log(s, AV_LOG_ERROR, "use mpegtsraw_demuxer!\n");
return -1; return -1;
} }
} }
#endif
/* read the first 1024 bytes to get packet size */ /* read the first 1024 bytes to get packet size */
pos = avio_tell(pb); pos = avio_tell(pb);

Loading…
Cancel
Save