Unified · Split
| @@ -204,7 +204,7 @@ static void video_encode_example(const char *filename) · 203 unmodified lines | |||
| 204 | printf("Video encoding\n"); | 204 | printf("Video encoding\n"); |
| 205 | 205 | ||
| 206 | /* find the mpeg1 video encoder */ | 206 | /* find the mpeg1 video encoder */ |
| 207 | codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); | 207 | codec = avcodec_find_encoder(CODEC_ID_H264); |
| 208 | if (!codec) { | 208 | if (!codec) { |
| 209 | fprintf(stderr, "codec not found\n"); | 209 | fprintf(stderr, "codec not found\n"); |
| 210 | exit(1); | 210 | exit(1); |
| @@ -445,8 +445,8 @@ int main(int argc, char **argv) · 234 unmodified lines | |||
| 445 | audio_encode_example("/tmp/test.mp2"); | 445 | audio_encode_example("/tmp/test.mp2"); |
| 446 | audio_decode_example("/tmp/test.sw", "/tmp/test.mp2"); | 446 | audio_decode_example("/tmp/test.sw", "/tmp/test.mp2"); |
| 447 | 447 | ||
| 448 | video_encode_example("/tmp/test.mpg"); | 448 | video_encode_example("/tmp/test.h264"); |
| 449 | filename = "/tmp/test.mpg"; | 449 | filename = "/tmp/test.h264"; |
| 450 | } else { | 450 | } else { |
| 451 | filename = argv[1]; | 451 | filename = argv[1]; |
| 452 | } | 452 | } |