comparison mjpeg.c @ 2028:141a9539e270 libavcodec

data_size = 0 cleanup
author michael
date Fri, 21 May 2004 14:37:16 +0000
parents 8d3540dddd1b
children 380c40efd6bb
comparison
equal deleted inserted replaced
2027:3a78447c3b53 2028:141a9539e270
1721 { 1721 {
1722 MJpegDecodeContext *s = avctx->priv_data; 1722 MJpegDecodeContext *s = avctx->priv_data;
1723 uint8_t *buf_end, *buf_ptr; 1723 uint8_t *buf_end, *buf_ptr;
1724 int start_code; 1724 int start_code;
1725 AVFrame *picture = data; 1725 AVFrame *picture = data;
1726
1727 *data_size = 0;
1728 1726
1729 /* no supplementary picture */ 1727 /* no supplementary picture */
1730 if (buf_size == 0) 1728 if (buf_size == 0)
1731 return 0; 1729 return 0;
1732 1730
1900 AVFrame *picture = data; 1898 AVFrame *picture = data;
1901 GetBitContext hgb; /* for the header */ 1899 GetBitContext hgb; /* for the header */
1902 uint32_t dqt_offs, dht_offs, sof_offs, sos_offs, second_field_offs; 1900 uint32_t dqt_offs, dht_offs, sof_offs, sos_offs, second_field_offs;
1903 uint32_t field_size; 1901 uint32_t field_size;
1904 1902
1905 *data_size = 0;
1906
1907 /* no supplementary picture */ 1903 /* no supplementary picture */
1908 if (buf_size == 0) 1904 if (buf_size == 0)
1909 return 0; 1905 return 0;
1910 1906
1911 buf_ptr = buf; 1907 buf_ptr = buf;
2012 MJpegDecodeContext *s = avctx->priv_data; 2008 MJpegDecodeContext *s = avctx->priv_data;
2013 #endif 2009 #endif
2014 const int qscale = 5; 2010 const int qscale = 5;
2015 uint8_t *buf_ptr, *buf_end, *recoded; 2011 uint8_t *buf_ptr, *buf_end, *recoded;
2016 int i = 0, j = 0; 2012 int i = 0, j = 0;
2017
2018 *data_size = 0;
2019 2013
2020 /* no supplementary picture */ 2014 /* no supplementary picture */
2021 if (buf_size == 0) 2015 if (buf_size == 0)
2022 return 0; 2016 return 0;
2023 2017