Mercurial > libavcodec.hg
comparison mpeg12.c @ 825:92c6d8b71e3b libavcodec
handle init error in ffmpeg12
author | arpi_esp |
---|---|
date | Sat, 02 Nov 2002 01:43:19 +0000 |
parents | dfaa1c45bd27 |
children | ce240888252d |
comparison
equal
deleted
inserted
replaced
824:371ef113d984 | 825:92c6d8b71e3b |
---|---|
1580 memset(s->last_mv, 0, sizeof(s->last_mv)); | 1580 memset(s->last_mv, 0, sizeof(s->last_mv)); |
1581 /* start frame decoding */ | 1581 /* start frame decoding */ |
1582 if (s->first_slice) { | 1582 if (s->first_slice) { |
1583 s->first_slice = 0; | 1583 s->first_slice = 0; |
1584 if(MPV_frame_start(s, avctx) < 0) | 1584 if(MPV_frame_start(s, avctx) < 0) |
1585 return -1; | 1585 return -2; |
1586 } | 1586 } |
1587 | 1587 |
1588 init_get_bits(&s->gb, buf, buf_size); | 1588 init_get_bits(&s->gb, buf, buf_size); |
1589 | 1589 |
1590 s->qscale = get_qscale(s); | 1590 s->qscale = get_qscale(s); |
1926 avctx->repeat_pict = 1; | 1926 avctx->repeat_pict = 1; |
1927 } | 1927 } |
1928 } | 1928 } |
1929 *data_size = sizeof(AVPicture); | 1929 *data_size = sizeof(AVPicture); |
1930 goto the_end; | 1930 goto the_end; |
1931 }else if(ret==-1){ | 1931 }else if(ret<0){ |
1932 printf("Error while decoding slice\n"); | 1932 printf("Error while decoding slice\n"); |
1933 if(ret<-1) return -1; | |
1933 } | 1934 } |
1934 } | 1935 } |
1935 break; | 1936 break; |
1936 } | 1937 } |
1937 } | 1938 } |